Tornado add_callback_from_signal 和 add_callback 的区别是什么?

tornado ioloop中有add_callback和add_callback_from_signal两个方法,不知道两者的差别是什么?

阅读 4.3k
1 个回答

文档又不是没有写:

Safe for use from a Python signal handler; should not be used otherwise.

Callbacks added with this method will be run without any stack_context, to avoid picking up the context of the function that was interrupted by the signal.

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题