I looked at Beanstalkd , which is worth working with work queues with several processors, which are the manufacturer and / or consumers, which keeps worrying about the thread.
There is a Python client on beanstalkc
An example taken from their wiki.
>>> import beanstalkc >>> beanstalk = beanstalkc.Connection(host='localhost', port=14711) >>> beanstalk.put('hey!') 1 >>> job = beanstalk.reserve() >>> job.body 'hey!' >>> job.delete()
It can meet your needs - IIRC you can also have strong lines.
source share