Tornado 6.1 Documentation
Blocking A function blocks when it waits for something to happen before returning. A function may block for many reasons: network I/O, disk I/O, mutexes, etc. In fact, every function blocks, at least a easier [https://glyph.twistedmatrix.com/2014/02/unyielding.html] to reason about by reducing the number of places where a context switch can happen. Example: async def fetch_coroutine(url): http_client root URL / is mapped to MainHandler and URLs of the form /story/ followed by a number are mapped to StoryHandler. That number is passed (as a string) to StoryHandler.get. class MainHandler(RequestHandler):0 码力 | 931 页 | 708.03 KB | 1 年前3
Tornado 6.0 Documentation
Blocking A function blocks when it waits for something to happen before returning. A function may block for many reasons: network I/O, disk I/O, mutexes, etc. In fact, every function blocks, at least a easier [https://glyph.twistedmatrix.com/2014/02/unyielding.html] to reason about by reducing the number of places where a context switch can happen. Example: async def fetch_coroutine(url): http_client root URL / is mapped to MainHandler and URLs of the form /story/ followed by a number are mapped to StoryHandler. That number is passed (as a string) to StoryHandler.get. class MainHandler(RequestHandler):0 码力 | 869 页 | 692.83 KB | 1 年前3
Tornado 5.1 Documentation
Blocking A function blocks when it waits for something to happen before returning. A function may block for many reasons: network I/O, disk I/O, mutexes, etc. In fact, every function blocks, at least a without the expense of a thread. They also make concurrency easier to reason about by reducing the number of places where a context switch can happen. Example: async def fetch_coroutine(url): http_client root URL / is mapped to MainHandler and URLs of the form /story/ followed by a number are mapped to StoryHandler. That number is passed (as a string) to StoryHandler.get. class MainHandler(RequestHandler):0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 4.5 Documentation
Blocking A function blocks when it waits for something to happen before returning. A function may block for many reasons: network I/O, disk I/O, mutexes, etc. In fact, every function blocks, at least a easier [https://glyph.twistedmatrix.com/2014/02/unyielding.html] to reason about by reducing the number of places where a context switch can happen. Example: from tornado import gen @gen.coroutine def root URL / is mapped to MainHandler and URLs of the form /story/ followed by a number are mapped to StoryHandler. That number is passed (as a string) to StoryHandler.get. class MainHandler(RequestHandler):0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 4.5 Documentation
Blocking A function blocks when it waits for something to happen before returning. A function may block for many reasons: network I/O, disk I/O, mutexes, etc. In fact, every function blocks, at least a without the expense of a thread. They also make concurrency easier to reason about by reducing the number of places where a context switch can happen. Example: from tornado import gen @gen.coroutine def root URL / is mapped to MainHandler and URLs of the form /story/ followed by a number are mapped to StoryHandler. That number is passed (as a string) to StoryHandler.get. class MainHandler(RequestHandler):0 码力 | 222 页 | 833.04 KB | 1 年前3
Tornado 5.1 Documentation
Blocking A function blocks when it waits for something to happen before returning. A function may block for many reasons: network I/O, disk I/O, mutexes, etc. In fact, every function blocks, at least a easier [https://glyph.twistedmatrix.com/2014/02/unyielding.html] to reason about by reducing the number of places where a context switch can happen. Example: async def fetch_coroutine(url): http_client root URL / is mapped to MainHandler and URLs of the form /story/ followed by a number are mapped to StoryHandler. That number is passed (as a string) to StoryHandler.get. class MainHandler(RequestHandler):0 码力 | 359 页 | 347.32 KB | 1 年前3
Tornado 6.1 Documentation
Blocking A function blocks when it waits for something to happen before returning. A function may block for many reasons: network I/O, disk I/O, mutexes, etc. In fact, every function blocks, at least a without the expense of a thread. They also make concurrency easier to reason about by reducing the number of places where a context switch can happen. Example: async def fetch_coroutine(url): http_client root URL / is mapped to MainHandler and URLs of the form /story/ followed by a number are mapped to StoryHandler. That number is passed (as a string) to StoryHandler.get. class MainHandler(RequestHandler):0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 6.0 Documentation
Blocking A function blocks when it waits for something to happen before returning. A function may block for many reasons: network I/O, disk I/O, mutexes, etc. In fact, every function blocks, at least a without the expense of a thread. They also make concurrency easier to reason about by reducing the number of places where a context switch can happen. Example: async def fetch_coroutine(url): http_client root URL / is mapped to MainHandler and URLs of the form /story/ followed by a number are mapped to StoryHandler. That number is passed (as a string) to StoryHandler.get. class MainHandler(RequestHandler):0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 6.5 DocumentationBlocking A function blocks when it waits for something to happen before returning. A function may block for many reasons: network I/O, disk I/O, mutexes, etc. In fact, every function blocks, at least a without the expense of a thread. They also make concurrency easier to reason about by reducing the number of places where a context switch can happen. Example: async def fetch_coroutine(url): http_client root URL / is mapped to MainHandler and URLs of the form /story/ followed by a number are mapped to StoryHandler. That number is passed (as a string) to StoryHandler.get. class MainHandler(RequestHandler):0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.4 Documentation
Blocking A function blocks when it waits for something to happen before returning. A function may block for many reasons: network I/O, disk I/O, mutexes, etc. In fact, every function blocks, at least a without the expense of a thread. They also make concurrency easier to reason about by reducing the number of places where a context switch can happen. Example: async def fetch_coroutine(url): http_client root URL / is mapped to MainHandler and URLs of the form /story/ followed by a number are mapped to StoryHandler. That number is passed (as a string) to StoryHandler.get. class MainHandler(RequestHandler):0 码力 | 268 页 | 1.09 MB | 1 年前3
共 20 条
- 1
- 2













