In general, methods on
RequestHandler
and elsewhere in Tornado are not thread-safe. In particular, methods such as
write()
,
finish()
, and
flush()
must only be called from the main thread. If you use multiple threads it is important to use
IOLoop.add_callback
to transfer control back to the main thread before finishing the request.
tornado
最新推荐文章于 2024-10-20 19:21:09 发布