Tornado 6.5 Documentation
Application([ (r"/", MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait() if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s INTEGRATION Tornado is integrated with the standard library asyncio module and shares the same event loop (by default since Tornado 5.0). In general, libraries designed for use with asyncio can be mixed very expensive. To minimize the cost of concurrent connections, Tornado uses a single-threaded event loop. This means that all appli- cation code should aim to be asynchronous and non-blocking because0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.4 Documentation
Application([ (r"/", MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait() if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s INTEGRATION Tornado is integrated with the standard library asyncio module and shares the same event loop (by default since Tornado 5.0). In general, libraries designed for use with asyncio can be mixed very expensive. To minimize the cost of concurrent connections, Tornado uses a single-threaded event loop. This means that all appli- cation code should aim to be asynchronous and non-blocking because0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.4 Documentation
Application([ (r"/", MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait() if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s INTEGRATION Tornado is integrated with the standard library asyncio module and shares the same event loop (by default since Tornado 5.0). In general, libraries designed for use with asyncio can be mixed very expensive. To minimize the cost of concurrent connections, Tornado uses a single-threaded event loop. This means that all appli- cation code should aim to be asynchronous and non-blocking because0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.4 Documentation
Application([ (r"/", MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait() if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s INTEGRATION Tornado is integrated with the standard library asyncio module and shares the same event loop (by default since Tornado 5.0). In general, libraries designed for use with asyncio can be mixed very expensive. To minimize the cost of concurrent connections, Tornado uses a single-threaded event loop. This means that all appli- cation code should aim to be asynchronous and non-blocking because0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.3 Documentation
Application([ (r"/", MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait() if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s INTEGRATION Tornado is integrated with the standard library asyncio module and shares the same event loop (by default since Tornado 5.0). In general, libraries designed for use with asyncio can be mixed very expensive. To minimize the cost of concurrent connections, Tornado uses a single-threaded event loop. This means that all appli- cation code should aim to be asynchronous and non-blocking because0 码力 | 264 页 | 1.06 MB | 1 年前3Falcon v3.0.0 Documentation
deployments, you can install Uvicorn along with more optimized alternatives such as uvloop (a faster event loop), httptools (a faster HTTP protocol implementation) etc: $ pip install uvicorn[standard] See are simply all the things in your API or application that can be accessed by a URL. For example, an event booking application may have resources such as “ticket” and “venue”, while a video game backend may save(self, image_id, data): loop = asyncio.get_running_loop() image = await loop.run_in_executor(None, self._load_from_bytes, data) converted = await loop.run_in_executor(None, self._convert0 码力 | 1055 页 | 739.30 KB | 1 年前3Falcon v3.0.1 Documentation
deployments, you can install Uvicorn along with more optimized alternatives such as uvloop (a faster event loop), httptools (a faster HTTP protocol implementation) etc: $ pip install uvicorn[standard] See are simply all the things in your API or application that can be accessed by a URL. For example, an event booking application may have resources such as “ticket” and “venue”, while a video game backend may save(self, image_id, data): loop = asyncio.get_running_loop() image = await loop.run_in_executor(None, self._load_from_bytes, data) converted = await loop.run_in_executor(None, self._convert0 码力 | 1058 页 | 741.59 KB | 1 年前3Falcon v3.0.0-b2 Documentation
deployments, you can install Uvicorn along with more optimized alternatives such as uvloop (a faster event loop), httptools (a faster HTTP protocol implementation) etc: $ pip install uvicorn[standard] See are simply all the things in your API or application that can be accessed by a URL. For example, an event booking application may have resources such as “ticket” and “venue”, while a video game backend may save(self, image_id, data): loop = asyncio.get_running_loop() image = await loop.run_in_executor(None, self._load_from_bytes, data) converted = await loop.run_in_executor(None, self._convert0 码力 | 1041 页 | 730.21 KB | 1 年前3Tornado 6.2 Documentation
Application([ (r"/", MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event().wait() if __name__ == "__main__": asyncio.run(main()) This example does not use any of Tornado’s INTEGRATION Tornado is integrated with the standard library asyncio module and shares the same event loop (by default since Tornado 5.0). In general, libraries designed for use with asyncio can be mixed very expensive. To minimize the cost of concurrent connections, Tornado uses a single-threaded event loop. This means that all appli- cation code should aim to be asynchronous and non-blocking because0 码力 | 260 页 | 1.06 MB | 1 年前3Falcon v3.0.0-b1 Documentation
are simply all the things in your API or application that can be accessed by a URL. For example, an event booking application may have resources such as “ticket” and “venue”, while a video game backend may save(self, image_id, data): loop = asyncio.get_running_loop() image = await loop.run_in_executor(None, self._load_from_bytes, data) converted = await loop.run_in_executor(None, self._convert open(image.path, 'rb') as img_file: data = await img_file.read() loop = asyncio.get_running_loop() return await loop.run_in_executor(None, self._resize, data, size) As well as an internal helper0 码力 | 1028 页 | 725.86 KB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100