On Sep 1, 2009, at 10:37 PM, Laurent Daudelin wrote:

I don't explicitly create one. However, from inside the beginning of the method that runs in this secondary thread, I did print a trace of the output of [NSRunLoop currentRunLoop] and I did get information about the current runloop, which I assumed was set up when I detached. Am I to assume that this loop is actually the main run loop?

No -- you need to explicitly run the run loop for performSelector:withObject:afterDelay: to work.

If the run loop isn't running, a bunch of things -- including that -- won't work.

If you create a thread like:

thread_fun() {
while(1) {
   ... wait for stuff ...;
   ... do things to stuff ...;
};
}

Then you aren't running a run loop.

b.bum

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to