Re: Can't perform selectors after delay in a secondary thread?
Re: Can't perform selectors after delay in a secondary thread?
- Subject: Re: Can't perform selectors after delay in a secondary thread?
- From: Laurent Daudelin <email@hidden>
- Date: Tue, 01 Sep 2009 22:37:36 -0700
Clark,
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?
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org
Logiciels Nemesys Software email@hidden
Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries
On Sep 1, 2009, at 22:25 , Clark Cox wrote:
On Tue, Sep 1, 2009 at 10:16 PM, Laurent
Daudelin<email@hidden> wrote:
I've searched everywhere and cannot find the answer to this
question. I have
a method that uses NSThread to detach another method in a different
thread.
This method will then schedule another method but only after a
certain delay
so I use performSelector:withObject:afterDelay: but that second
method is
never called. What am I missing?
Do you have an NSRunLoop running in your thread?
performSelector:withObject:afterDelay: schedules the method call on
the current thread's runloop; if it isn't running, then the method
will never be called.
--
Clark S. Cox III
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden