multiprocessing.Pool, its queue, and pre-emption

Chris Angelico rosuav at
Fri Sep 16 00:35:20 CEST 2011

On Fri, Sep 16, 2011 at 8:25 AM, John Ladasky <ladasky at> wrote:
> Starting 50 milliseconds late would be close enough
> to "real time" for my purposes.
> ...
> If that's not putting T2 at the head of the queue, I guess I don't
> know a better way to describe it.

Yep, your terms are correct, with that caveat ("immediate" or "urgent"
without being "real-time"). So you're definitely looking for a
priority queue.

It may be possible to patch a different queue object straight into
Pool, but I've never done anything like that. It's probably best to
dig in the code and add an option somewhere to pass in a queue object
- that'd be a very useful feature imho.


More information about the Python-list mailing list