About

Dependencies

Examples

Here’s a basic example (for more see the examples section of the docs):

fromtornadoimportioloop,genimporttoroq=toro.JoinableQueue(maxsize=3)@gen.coroutinedefconsumer():whileTrue:item=yieldq.get()try:print'Doing work on',itemfinally:q.task_done()@gen.coroutinedefproducer():foriteminrange(10):yieldq.put(item)producer()consumer()loop=ioloop.IOLoop.instance()# block until all tasks are doneq.join().add_done_callback(loop.stop)loop.start()

Documentation

You will need Sphinx and GraphViz installed to generate the
documentation. Documentation can be generated like: