www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - pid thread

reply "Shadow_exe" <shadow_exe ukr.net> writes:
I have an application where multiple threads, as in the thread,
see this thread pid? I have some reason only returned pid master.
May 13 2012
parent =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
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
May 13 2012