Non-blocking pthread_join

后端 未结 8 830
一生所求
一生所求 2020-12-01 08:01

I\'m coding the shutdown of a multithreaded server.If everything goes as it should all the threads exit by their own, but there\'s a small chance that a thread gets stuck.In

8条回答
  •  执念已碎
    2020-12-01 08:35

    The answer really depends on why you want to do this. If you just want to clean up dead threads, for example, it's probably easiest just to have a "dead thread cleaner" thread that loops and joins.

提交回复
热议问题