pid thread
Ali Çehreli
acehreli at yahoo.com
Sun May 13 08:45:43 PDT 2012
On 05/13/2012 04:54 AM, Shadow_exe wrote:
> I have an application where multiple threads, as in the thread,
> see this thread pid? I have some reason only returned pid master.
I could not understand your question.
Do you mean "process id"? Then that is fine because all of the threads
run as a part of the same process. It is normal that they have the main
thread's pid.
If you mean "thread id", then you can pass them in many ways. For
example, you can start all the threads, but they can wait for special
messages that tell them about all the thread ids. They can start working
only after receiving the ids of other threads.
Another option is to use thread named. Look for the section 'Thread
names' below:
http://ddili.org/ders/d.en/concurrency.html
Ali
--
D Programming Language Tutorial: http://ddili.org/ders/d.en/index.html
More information about the Digitalmars-d
mailing list