Delay Queue Implementation in Python
from delayedqueue import DelayedQueue delay_queue = DelayedQueue() delay_queue.put("an item", 30) delay_queue.get() # Waits for 30seconds before returning "an item". If any other item is added via another thread and # if the delay precedes of that item, then that item will be returned first.
This project has been set up using PyScaffold 4.1.1. For details and usage information on PyScaffold see https://pyscaffold.org/.