Tornado 6.0 Documentation
Coroutines Native vs decorated coroutines How it works How to call a coroutine Coroutine patterns Calling blocking functions Parallelism Interleaving Looping Running in the background Queue example - a wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way to call a blocking function from a coroutine is to use IOLoop instead of write_error by calling set_status, writing a response, and returning. The special exception tornado.web.Finish may be raised to terminate the handler without calling write_error in situations0 码力 | 869 页 | 692.83 KB | 1 年前3
Tornado 6.1 Documentation
Coroutines Native vs decorated coroutines How it works How to call a coroutine Coroutine patterns Calling blocking functions Parallelism Interleaving Looping Running in the background Queue example - a wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way to call a blocking function from a coroutine is to use IOLoop instead of write_error by calling set_status, writing a response, and returning. The special exception tornado.web.Finish may be raised to terminate the handler without calling write_error in situations0 码力 | 931 页 | 708.03 KB | 1 年前3
Tornado 6.1 Documentation
wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way to call a blocking function from a coroutine is to use IOLoop instead of write_error by calling set_status, writing a response, and returning. The special exception tornado.web.Finish may be raised to terminate the handler without calling write_error in situations error page as described above: either by raising a HTTPError(404) and overriding write_error, or calling self.set_status(404) and producing the response directly in prepare(). Redirection There are two0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 5.1 Documentation
wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way to call a blocking function from a coroutine is to use IOLoop instead of write_error by calling set_status, writing a response, and returning. The special exception tornado.web.Finish may be raised to terminate the handler without calling write_error in situations error page as described above: either by raising a HTTPError(404) and overriding write_error, or calling self.set_status(404) and producing the response directly in prepare(). Redirection There are two0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 6.0 Documentation
wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way to call a blocking function from a coroutine is to use IOLoop instead of write_error by calling set_status, writing a response, and returning. The special exception tornado.web.Finish may be raised to terminate the handler without calling write_error in situations error page as described above: either by raising a HTTPError(404) and overriding write_error, or calling self.set_status(404) and producing the response directly in prepare(). Redirection There are two0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 4.5 Documentation
async and await How it works How to call a coroutine Coroutine patterns Interaction with callbacks Calling blocking functions Parallelism Interleaving Looping Running in the background Queue example - a # some_function(other_args, callback=callback) yield gen.Task(some_function, other_args) Calling blocking functions The simplest way to call a blocking function from a coroutine is to use a ThreadPoolExecutor instead of write_error by calling set_status, writing a response, and returning. The special exception tornado.web.Finish may be raised to terminate the handler without calling write_error in situations0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 5.1 Documentation
Coroutines Native vs decorated coroutines How it works How to call a coroutine Coroutine patterns Calling blocking functions Parallelism Interleaving Looping Running in the background Queue example - a wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way to call a blocking function from a coroutine is to use IOLoop instead of write_error by calling set_status, writing a response, and returning. The special exception tornado.web.Finish may be raised to terminate the handler without calling write_error in situations0 码力 | 359 页 | 347.32 KB | 1 年前3
Tornado 4.5 Documentation
into # some_function(other_args, callback=callback) yield gen.Task(some_function, other_args) Calling blocking functions The simplest way to call a blocking function from a coroutine is to use a ThreadPoolExecutor instead of write_error by calling set_status, writing a response, and returning. The special exception tornado.web.Finish may be raised to terminate the handler without calling write_error in situations error page as described above: either by raising a HTTPError(404) and overriding write_error, or calling self.set_status(404) and producing the response directly in prepare(). Redirection There are two0 码力 | 222 页 | 833.04 KB | 1 年前3
Tornado 6.4 Documentation
wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way to call a blocking function from a coroutine is to use IOLoop instead of write_error by calling set_status, writing a response, and returning. The special exception tornado.web.Finish may be raised to ter- minate the handler without calling write_error in situations error page as described above: either by raising a HTTPError(404) and overriding write_error, or calling self. set_status(404) and producing the response directly in prepare(). Redirection There are two0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
wrap the # call in a lambda. IOLoop.current().run_sync(lambda: divide(1, 0)) Coroutine patterns Calling blocking functions The simplest way to call a blocking function from a coroutine is to use IOLoop instead of write_error by calling set_status, writing a response, and returning. The special exception tornado.web.Finish may be raised to ter- minate the handler without calling write_error in situations error page as described above: either by raising a HTTPError(404) and overriding write_error, or calling self. set_status(404) and producing the response directly in prepare(). Redirection There are two0 码力 | 268 页 | 1.09 MB | 1 年前3
共 20 条
- 1
- 2













