在线程的所有属性中,最重要的是分离属性(detach status),一个线程可以是等待线程(joinable thread)or分离线程(detach thread),默认是joinable thread;
基于12个网页-相关网页
The thread resources of the joinable thread are released only after it is joined.
可连接的线程只有在被连接后 才释放线程资源。
If you create a joinable thread but forget to join it, its resources or private memory are always kept in the process space and never reclaimed.
如果您创建一个可接合的线程,但是忘记联接它,其资源或私有内存一直保存在进程空间中,从未进行回收再利用。
As demonstrated in Listing 1 and 2, joinable threads are produced, but they are never joined, so each terminated joinable thread still occupies the process space, leaking the process memory.
如清单1和清单2所示,虽然生成了可接合线程,但是却未将其联接,因此每个终止的可接合线程仍然占用进程空间,泄漏进程内存。
应用推荐