philipbl / python-persistent-queue

A persistent queue for Python
9 stars 4 forks source link

Support timeout for blocking peek/pop #2

Closed Kriechi closed 7 years ago

Kriechi commented 8 years ago

It would be very useful to support the timeout argument for pushed_event.wait() function of threading.Event.

philipbl commented 8 years ago

I haven't needed this functionality where I am using python-persistent-queue so I haven't bothered implementing it yet. If you are interested, I will implement it eventually or you can make a PR.

Kriechi commented 8 years ago

I'm currently trying to adopt my application to use python-persistent-queue instead of the stdlib queue.Queue. However, there a few few minor API-incompatibilities. It would be nice to bring the API closer to the stdlib version. That's the reason why I'm missing timeout at the moment.