Tornado 4.5 Documentation
server Coroutines and concurrency tornado.gen — Simplify asynchronous code tornado.concurrent — Work with threads and futures tornado.locks – Synchronization primitives tornado.queues – Queues for coroutines Asynchronous An asynchronous function returns before it is finished, and generally causes some work to happen in the background before triggering some future action in the application (as opposed to futures]. You can use tornado.gen.convert_yielded to convert anything that would work with yield into a form that will work with await: async def f(): executor = concurrent.futures.ThreadPoolExecutor()0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 5.1 Documentation
Asynchronous An asynchronous function returns before it is finished, and generally causes some work to happen in the background before triggering some future action in the application (as opposed to simplification by letting you organize your code in the same way you would if it were synchronous. This is especially important for error handling, since try/except blocks work as you would expect in coroutines starts the native coroutine in the background. # This is equivalent to asyncio.ensure_future() (both work in Tornado). (continues on next page) 16 Chapter 5. Documentation Tornado Documentation, Release0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 4.5 Documentation
Asynchronous An asynchronous function returns before it is finished, and generally causes some work to happen in the background before triggering some future action in the application (as opposed to futures. You can use tornado.gen.convert_yielded to convert anything that would work with yield into a form that will work with await: async def f(): executor = concurrent.futures.ThreadPoolExecutor() once. Eventually, a worker fetches a page whose URLs have all been seen before, and there is also no work left in the queue. Thus that worker’s call to task_done decrements the counter to zero. The main coroutine0 码力 | 222 页 | 833.04 KB | 1 年前3
Tornado 5.1 Documentation
Utilities tornado.autoreload — Automatically detect code changes in development tornado.concurrent — Work with Future objects tornado.log — Logging support tornado.options — Command-line parsing tornado.stack_context Asynchronous An asynchronous function returns before it is finished, and generally causes some work to happen in the background before triggering some future action in the application (as opposed to simplification by letting you organize your code in the same way you would if it were synchronous. This is especially important for error handling, since try/except blocks work as you would expect in coroutines0 码力 | 359 页 | 347.32 KB | 1 年前3
Tornado 6.1 Documentation
Asynchronous An asynchronous function returns before it is finished, and generally causes some work to happen in the background before triggering some future action in the application (as opposed to simplification by letting you organize your code in the same way you would if it were synchronous. This is especially important for error handling, since try/except blocks work as you would expect in coroutines starts the native coroutine in the background. # This is equivalent to asyncio.ensure_future() (both work in Tornado). (continues on next page) 18 Chapter 6. Documentation Tornado Documentation, Release0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 6.0 Documentation
Asynchronous An asynchronous function returns before it is finished, and generally causes some work to happen in the background before triggering some future action in the application (as opposed to simplification by letting you organize your code in the same way you would if it were synchronous. This is especially important for error handling, since try/except blocks work as you would expect in coroutines starts the native coroutine in the background. # This is equivalent to asyncio.ensure_future() (both work in Tornado). fetch_future = convert_yielded(self.fetch_next_chunk()) while True: chunk = yield fetch_future0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 6.5 DocumentationAsynchronous An asynchronous function returns before it is finished, and generally causes some work to happen in the background before triggering some future action in the application (as opposed to simplification by letting you organize your code in the same way you would if it were synchronous. This is especially important for error handling, since try/except blocks work as you would expect in coroutines starts the native coroutine in the background. # This is equivalent to asyncio.ensure_future() (both work in Tornado). fetch_future = convert_yielded(self.fetch_next_chunk()) while True: chunk = await fetch_future0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.4 Documentation
Asynchronous An asynchronous function returns before it is finished, and generally causes some work to happen in the background before triggering some future action in the application (as opposed to simplification by letting you organize your code in the same way you would if it were synchronous. This is especially important for error handling, since try/except blocks work as you would expect in coroutines starts the native coroutine in the background. # This is equivalent to asyncio.ensure_future() (both work in Tornado). fetch_future = convert_yielded(self.fetch_next_chunk()) while True: chunk = await fetch_future0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
Asynchronous An asynchronous function returns before it is finished, and generally causes some work to happen in the background before triggering some future action in the application (as opposed to simplification by letting you organize your code in the same way you would if it were synchronous. This is especially important for error handling, since try/except blocks work as you would expect in coroutines starts the native coroutine in the background. # This is equivalent to asyncio.ensure_future() (both work in Tornado). fetch_future = convert_yielded(self.fetch_next_chunk()) while True: chunk = await fetch_future0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
Asynchronous An asynchronous function returns before it is finished, and generally causes some work to happen in the background before triggering some future action in the application (as opposed to simplification by letting you organize your code in the same way you would if it were synchronous. This is especially important for error handling, since try/except blocks work as you would expect in coroutines starts the native coroutine in the background. # This is equivalent to asyncio.ensure_future() (both work in Tornado). fetch_future = convert_yielded(self.fetch_next_chunk()) while True: chunk = await fetch_future0 码力 | 268 页 | 1.09 MB | 1 年前3
共 20 条
- 1
- 2













