Re: performSelectorOnMainThread fails second time through
Re: performSelectorOnMainThread fails second time through
- Subject: Re: performSelectorOnMainThread fails second time through
- From: Dave Keck <email@hidden>
- Date: Wed, 8 Dec 2010 16:22:35 -0500
> So could this issue be something to do with the timing of the first time the
> threaded operation is run?
I'd imagine it involves NSThread making an assumption about the
initial invocation of one of its APIs, and the run loop that it
expects to exist at the time of that invocation. Assuming your code
isn't committing some grave API sin, then perhaps this is a bug in
Foundation.
If you get the chance, see if you can whittle the project down to
isolate the set of code that still exhibits the issue. I'd personally
be interested in seeing the cause of the strange behavior.
> During startup of the application, in an awakeFromNib, it calls a
> performSelector...afterDelay:0, and when that eventually fires, it triggers
> the thread to run. I would have thought that would be perfectly safe, but
> maybe not?
I just implemented that in my test app and the calls to
-performSelectorOnMainThread seem to work fine.
_______________________________________________
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