OK, I meant I'm not *running* any run loops myself - as per the threading 
documentation: "For secondary threads, you need to decide whether a run loop is 
necessary, and if it is, configure and start it yourself. You do not need to 
start a thread’s run loop in all cases. For example, if you use a thread to 
perform some long-running and predetermined task, you can probably avoid 
starting the run loop. Run loops are intended for situations where you want 
more interactivity with the thread."

1. No
2. No.
3. IIt's stock standard:

int main(int argc, char *argv[])
{
    return NSApplicationMain(argc,  (const char **) argv);
}

4. Yes! It does work. Yay! 


Regards

Gideon

On 08/12/2010, at 10:02 PM, Dave Keck wrote:

>> FYI, I do not create any run loops explicitly in my application
> 
> That's good, because run loops can't be created explicitly. :)
> 
>> and can't think of anything I am doing which would create one implicitly.
> 
> A run loop is automatically created for every thread that's spawned.
> (I believe this happens lazily though.)
> 
> So to summarize, it appears that the instance of NSThread representing
> the main thread has the wrong instance of CFRunLoop. Some thoughts:
> 
> 1. Are you using the pthread APIs directly in your code? I recall
> there are several places in the docs that mention certain
> considerations that have to be made to use the pthread and
> Cocoa/NSThread APIs safely together.
> 
> 2. Do you have any functions marked __attribute__ ((constructor)) ?
> 
> 3. What does your main() function look like?
> 
> 4. Does -performSelectorOnMainThread work if you call [NSThread
> mainThread] as the first line in main()?

_______________________________________________

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