简体   繁体   English

一个线程可以由不同的线程创建和加入吗?

[英]Can a thread be created and joined by different threads?

如果 A 使用pthread_create创建线程 B 和 C,则 B 可以在 C 上调用pthread_join (假设 C 的 thread_id pthread_t是可访问的)

There is no parent-child relationship between POSIX threads. POSIX 线程之间没有父子关系。 All threads are peers.所有线程都是对等的。 Any thread can be joined by any other.任何线程都可以被任何其他线程加入。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM