On May 6, 2009, at 9:03 AM, Michael Ash wrote:

It is correct that every thread conceptually has exactly one runloop.
I say "conceptually" because in fact they are created on demand.

So if a thread has no need to pay attention to asynchronous events (timers, input sources, etc) but is only in existence to run its own functional code (say, calculate a square root), it has no need to have a runloop running. It can simply execute in more or less linear fashion and exit.

A thread starts out with no runloop, but as soon something tries to
interact with that thread's runloop, one is created for it.


Here's where I don't quite follow. If my thread doesn't set up and explicitly run its runloop, won't async events just get ignored because the thread has no code to receive/process them?


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to