Tornado 6.0 Documentation
current().start() if __name__ == '__main__': main() Configure your operating system or process manager to run this program to start the server. Please note that it may be necessary to increase the number Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) We support virtual hosts with the add_handlers method, which takes in a host regular expression as the first argument: the semaphore has been released once, by worker 0. The semaphore can be used as an async context manager: async def worker(worker_id): async with sem: print("Worker %d is working" % worker_id)0 码力 | 869 页 | 692.83 KB | 1 年前3
Tornado 6.1 Documentation
current().start() if __name__ == '__main__': main() Configure your operating system or process manager to run this program to start the server. Please note that it may be necessary to increase the number Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) We support virtual hosts with the add_handlers method, which takes in a host regular expression as the first argument: the semaphore has been released once, by worker 0. The semaphore can be used as an async context manager: async def worker(worker_id): async with sem: print("Worker %d is working" % worker_id)0 码力 | 931 页 | 708.03 KB | 1 年前3
Tornado 4.5 Documentation
current().start() if __name__ == '__main__': main() Configure your operating system or process manager to run this program to start the server. Please note that it may be necessary to increase the number Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) We support virtual hosts with the add_handlers method, which takes in a host regular expression as the first argument: but worker 2 waits until the semaphore has been released once, by worker 0. acquire is a context manager, so worker could be written as: @gen.coroutine def worker(worker_id): with (yield sem.acquire()):0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 4.5 Documentation
current().start() if __name__ == '__main__': main() Configure your operating system or process manager to run this program to start the server. Please note that it may be necessary to increase the number web.Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) We support virtual hosts with the add_handlers method, which takes in a host regular expression as the first argument: but worker 2 waits until the semaphore has been released once, by worker 0. acquire is a context manager, so worker could be written as: @gen.coroutine def worker(worker_id): with (yield sem.acquire()):0 码力 | 222 页 | 833.04 KB | 1 年前3
Tornado 5.1 Documentation
current().start() if __name__ == '__main__': main() Configure your operating system or process manager to run this program to start the server. Please note that it may be necessary to increase the number web.Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) We support virtual hosts with the add_handlers method, which takes in a host regular expression as the first argument: the semaphore has been released once, by worker 0. The semaphore can be used as an async context manager: async def worker(worker_id): async with sem: print("Worker %d is working" % worker_id) await0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 6.5 Documentationwait() if __name__ == '__main__': asyncio.run(main()) Configure your operating system or process manager to run this program to start the server. Please note that it may be necessary to increase the number web.Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) We support virtual hosts with the add_handlers method, which takes in a host regular expression as the first argument: the semaphore has been released once, by worker 0. The semaphore can be used as an async context manager: async def worker(worker_id): async with sem: print("Worker %d is working" % worker_id) await0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.1 Documentation
current().start() if __name__ == '__main__': main() Configure your operating system or process manager to run this program to start the server. Please note that it may be necessary to increase the number web.Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) We support virtual hosts with the add_handlers method, which takes in a host regular expression as the first argument: the semaphore has been released once, by worker 0. The semaphore can be used as an async context manager: 120 Chapter 6. Documentation Tornado Documentation, Release 6.1 async def worker(worker_id):0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 6.0 Documentation
current().start() if __name__ == '__main__': main() Configure your operating system or process manager to run this program to start the server. Please note that it may be necessary to increase the number web.Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) We support virtual hosts with the add_handlers method, which takes in a host regular expression as the first argument: the semaphore has been released once, by worker 0. The semaphore can be used as an async context manager: async def worker(worker_id): async with sem: print("Worker %d is working" % worker_id) await0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 5.1 Documentation
current().start() if __name__ == '__main__': main() Configure your operating system or process manager to run this program to start the server. Please note that it may be necessary to increase the number Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) We support virtual hosts with the add_handlers method, which takes in a host regular expression as the first argument: the semaphore has been released once, by worker 0. The semaphore can be used as an async context manager: async def worker(worker_id): async with sem: print("Worker %d is working" % worker_id)0 码力 | 359 页 | 347.32 KB | 1 年前3
Tornado 6.4 Documentation
wait() if __name__ == '__main__': asyncio.run(main()) Configure your operating system or process manager to run this program to start the server. Please note that it may be necessary to increase the number web.Application([ (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}), ]) We support virtual hosts with the add_handlers method, which takes in a host regular expression as the first argument: the semaphore has been released once, by worker 0. The semaphore can be used as an async context manager: async def worker(worker_id): async with sem: print("Worker %d is working" % worker_id) await0 码力 | 268 页 | 1.09 MB | 1 年前3
共 20 条
- 1
- 2













