• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: pthreads and CF runloops (possibly slightly OT)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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,

On Nov 10, 2005, at 9:07 AM, Philip Lukidis wrote:

However, I've read that a "POSIX thread does not
automatically associate itself with your application's run loop" (see link
below, sorry for the wrapping).

http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/ind
ex.html?http://developer.apple.com/documentation/Cocoa/Conceptual/Multithrea
ding/Multithreading.html

That link points to the top of that document. Were you thinking of <http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/articles/ThreadIntro.html>? That says:

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


__________________________________________________________________

Garth Cummings                

Apple Developer Technical Support     email@hidden


http://developer.apple.com/technicalsupport



 _______________________________________________
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

References: 
 >pthreads and CF runloops (possibly slightly OT) (From: Philip Lukidis <email@hidden>)

  • Prev by Date: pthreads and CF runloops (possibly slightly OT)
  • Next by Date: Re: pthreads and CF runloops (possibly slightly OT)
  • Previous by thread: pthreads and CF runloops (possibly slightly OT)
  • Next by thread: Re: pthreads and CF runloops (possibly slightly OT)
  • Index(es):
    • Date
    • Thread