Tornado 4.5 Documentation
tornado.concurrent — Work with threads and futures tornado.locks – Synchronization primitives tornado.queues – Queues for coroutines tornado.process — Utilities for multiple processes Integration with # Wait for the timer to run out. Queue example - a concurrent web spider Tornado’s tornado.queues module implements an asynchronous producer / consumer pattern for coroutines, analogous to the tornado.locks – Synchronization primitives Condition Event Semaphore BoundedSemaphore Lock tornado.queues – Queues for coroutines Classes Queue PriorityQueue LifoQueue Exceptions QueueEmpty QueueFull0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 5.1 Documentation
concurrency tornado.gen — Generator-based coroutines tornado.locks – Synchronization primitives tornado.queues – Queues for coroutines tornado.process — Utilities for multiple processes Integration with # Wait for the timer to run out. Queue example - a concurrent web spider Tornado’s tornado.queues module implements an asynchronous producer / consumer pattern for coroutines, analogous to the tornado.locks – Synchronization primitives Condition Event Semaphore BoundedSemaphore Lock tornado.queues – Queues for coroutines Classes Queue PriorityQueue LifoQueue Exceptions QueueEmpty QueueFull0 码力 | 359 页 | 347.32 KB | 1 年前3
Tornado 6.1 Documentation
nxt # Wait for the timer to run out. 6.1.4 Queue example - a concurrent web spider Tornado’s tornado.queues module implements an asynchronous producer / consumer pattern for coroutines, anal- ogous to coroutine in line waiting for acquire gets the lock. If not locked, raise a RuntimeError. 6.5.3 tornado.queues – Queues for coroutines New in version 4.2. Asynchronous queues for coroutines. These classes Tornado Documentation, Release 6.1 from tornado import gen from tornado.ioloop import IOLoop from tornado.queues import Queue q = Queue(maxsize=2) async def consumer(): async for item in q: try: print('Doing0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 4.5 Documentation
nxt # Wait for the timer to run out. 4.1.4 Queue example - a concurrent web spider Tornado’s tornado.queues module implements an asynchronous producer / consumer pattern for coroutines, anal- ogous to coroutine in line waiting for acquire gets the lock. If not locked, raise a RuntimeError. 4.5.4 tornado.queues – Queues for coroutines New in version 4.2. Asynchronous queues for coroutines. Warning: Unlike the queue size is unbounded. from tornado import gen from tornado.ioloop import IOLoop from tornado.queues import Queue q = Queue(maxsize=2) @gen.coroutine def consumer(): while True: item = yield0 码力 | 222 页 | 833.04 KB | 1 年前3
Tornado 5.1 Documentation
nxt # Wait for the timer to run out. 5.1.4 Queue example - a concurrent web spider Tornado’s tornado.queues module implements an asynchronous producer / consumer pattern for coroutines, anal- ogous to coroutine in line waiting for acquire gets the lock. If not locked, raise a RuntimeError. 5.5.3 tornado.queues – Queues for coroutines New in version 4.2. Asynchronous queues for coroutines. These classes the queue size is unbounded. from tornado import gen from tornado.ioloop import IOLoop from tornado.queues import Queue q = Queue(maxsize=2) async def consumer(): async for item in q: try: print('Doing0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 6.0 Documentation
nxt # Wait for the timer to run out. 6.1.4 Queue example - a concurrent web spider Tornado’s tornado.queues module implements an asynchronous producer / consumer pattern for coroutines, anal- ogous to coroutine in line waiting for acquire gets the lock. If not locked, raise a RuntimeError. 6.5.3 tornado.queues – Queues for coroutines New in version 4.2. Asynchronous queues for coroutines. These classes the queue size is unbounded. from tornado import gen from tornado.ioloop import IOLoop from tornado.queues import Queue q = Queue(maxsize=2) async def consumer(): async for item in q: try: print('Doing0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 6.2 Documentation
concurrency tornado.gen — Generator-based coroutines tornado.locks – Synchronization primitives tornado.queues – Queues for coroutines tornado.process — Utilities for multiple processes Integration with # Wait for the timer to run out. Queue example - a concurrent web spider Tornado’s tornado.queues module (and the very similar Queue classes in asyncio [https://docs.python.org/3/library/asyncio tornado.locks – Synchronization primitives Condition Event Semaphore BoundedSemaphore Lock tornado.queues – Queues for coroutines Classes Queue PriorityQueue LifoQueue Exceptions QueueEmpty QueueFull0 码力 | 407 页 | 385.03 KB | 1 年前3
Tornado 6.4 Documentation
nxt # Wait for the timer to run out. 6.1.4 Queue example - a concurrent web spider Tornado’s tornado.queues module (and the very similar Queue classes in asyncio) implements an asynchronous producer / coroutine in line waiting for acquire gets the lock. If not locked, raise a RuntimeError. 6.5.3 tornado.queues – Queues for coroutines New in version 4.2. Asynchronous queues for coroutines. These classes 129 Tornado Documentation, Release 6.4 import asyncio from tornado.ioloop import IOLoop from tornado.queues import Queue q = Queue(maxsize=2) async def consumer(): async for item in q: try: print('Doing0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.2 Documentation
nxt # Wait for the timer to run out. 6.1.4 Queue example - a concurrent web spider Tornado’s tornado.queues module (and the very similar Queue classes in asyncio) implements an asynchronous producer / raise a RuntimeError. 128 Chapter 6. Documentation Tornado Documentation, Release 6.2 6.5.3 tornado.queues – Queues for coroutines New in version 4.2. Asynchronous queues for coroutines. These classes default) the queue size is unbounded. import asyncio from tornado.ioloop import IOLoop from tornado.queues import Queue q = Queue(maxsize=2) async def consumer(): async for item in q: try: print('Doing0 码力 | 260 页 | 1.06 MB | 1 年前3
Tornado 6.4 Documentation
nxt # Wait for the timer to run out. 6.1.4 Queue example - a concurrent web spider Tornado’s tornado.queues module (and the very similar Queue classes in asyncio) implements an asynchronous producer / coroutine in line waiting for acquire gets the lock. If not locked, raise a RuntimeError. 6.5.3 tornado.queues – Queues for coroutines New in version 4.2. Asynchronous queues for coroutines. These classes 129 Tornado Documentation, Release 6.4 import asyncio from tornado.ioloop import IOLoop from tornado.queues import Queue q = Queue(maxsize=2) async def consumer(): async for item in q: try: print('Doing0 码力 | 268 页 | 1.09 MB | 1 年前3
共 20 条
- 1
- 2













