开发者

which thread does a new thread sees as 'parent'

开发者 https://www.devze.com 2023-01-26 19:45 出处:网络
i have a winForm app. The program.cs launches form1 and another thread sThread. I call a function from sThread on form1 that creates a new thread z . Which of the two(form1 and sThread) will z conside

i have a winForm app. The program.cs launches form1 and another thread sThread. I call a function from sThread on form1 that creates a new thread z . Which of the two(form1 and sThread) will z consider as 开发者_StackOverflow中文版parent ?


A thread doesn't have a parent. The notion is meaningless. The 'container' for threads is the process.


threads have no parent child hiererchy but processes do. so if process A "forks" a process "B" then A is parent of B meaning that A and B can share memory and communicate

0

精彩评论

暂无评论...
验证码 换一张
取 消