How to quit an asyncore dispatcher from a handler?

后端 未结 4 1820
谎友^
谎友^ 2020-12-18 03:48

I couldn\'t find this in the docs, but how am I meant to break out of the asyncore.loop() without using signals?

4条回答
  •  自闭症患者
    2020-12-18 04:35

    The asyncore loop also quits when there are no connections left, so you could just close the connection. If you have multiple connections going on then you can use asyncore.close_all().

提交回复
热议问题