Zombie Threads on POSIX systems

前端 未结 2 1610
抹茶落季
抹茶落季 2021-01-13 10:34

How do zombie threads get formed in C/C++, and what do you need to make sure to do in order to prevent them from being created? I know they\'re just normal threads that did

2条回答
  •  一向
    一向 (楼主)
    2021-01-13 10:59

    A zombie thread is a joinable thread which has terminated, but which hasn't been joined. Normally, either a thread should be joined at some time, or it should be detached. Otherwise, the OS maintains its state for some possible future join, which takes resources.

提交回复
热议问题