Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def clear(self):
"""Remove all items from the inbox.
"""
while True:
try:
self._queue.sync_q.get_nowait()
except janus.SyncQueueEmpty:
break