MCPcopy Create free account
hub / github.com/FDio/vpp / collect_events

Method collect_events

test/vpp_papi_provider.py:302–310  ·  view source on GitHub ↗

Collect all events from the internal queue and clear the queue.

(self)

Source from the content-addressed store, hash-verified

300 self.hook = hook
301
302 def collect_events(self):
303 """Collect all events from the internal queue and clear the queue."""
304 result = []
305 while True:
306 try:
307 e = self._events.get(block=False)
308 result.append(e)
309 except queue.Empty:
310 return result
311
312 def wait_for_event(self, timeout, name=None):
313 """Wait for and return next event."""

Calls 2

appendMethod · 0.80
getMethod · 0.45