Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已阅读示例代码,但似乎找不到线程轮询的退出条件。
有什么线索吗?
只要您不调用:avahi_threaded_poll_stop(threaded_poll)从主循环(或..._quit从辅助线程内部),看起来线程循环就会运行。当客户端回调返回时,您可能希望这样做AVAHI_CLIENT_FAILURE。(见客户示例)
avahi_threaded_poll_stop(threaded_poll)
..._quit
AVAHI_CLIENT_FAILURE
这就是你问的原因吗?