Re: pthreads and CF runloops (possibly slightly OT)
Re: pthreads and CF runloops (possibly slightly OT)
- Subject: Re: pthreads and CF runloops (possibly slightly OT)
- From: Garth Cummings <email@hidden>
- Date: Thu, 10 Nov 2005 09:26:16 -0800
Hi Philip,
Threads and run loops are tightly entwined entities. Many simple threads do not use the run loop and simply execute the code in their entry-point function. However, if you want your thread to remain running so that it can process requests at a future time, you need to start the thread’s run loop.
When I create a pthread, is a new run loop created, and is the pthread associated with it?
Yes, to both questions. The confusion might be that the run loop isn't automatically _started_ when the thread runs. That can be done with CFRunLoopRun after attaching at least one run loop event source.
HTH, --gc
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden