NSRunLoop performSelector question
NSRunLoop performSelector question
- Subject: NSRunLoop performSelector question
- From: Craig Hopson <email@hidden>
- Date: Thu, 11 May 2006 10:22:38 -0600
In my app I use several threads to handle various processing tasks.
The processing starts when a button is clicked and proceeds until the
data is used up. Each of the various threads may finish their part
at a different time, so they signal back to the main thread via a
callback. In the callback I set a flag for each thread as it calls.
When all of the threads have reported in, I call
[ _mainRunLoop performSelector:@selector(myCleanup)
target:self
argument:nil
order:10
modes:
[ NSArray arrayWithObject:NSDefaultRunLoopMode ]];
This works well but for one thing... If I keep hands off the
application - no key events, no mouse clicks, etc. - the selector is
never called (well, I been patient enough to wait 30 seconds). As
soon as I click the mouse, hit a key, etc. the selector is called. I
assume the run loop is waiting for some input to run. So, how do I
trigger this?
Thanks for your help!
Craig Hopson
Red Rock Software
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden