• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSRunLoop performSelector question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSRunLoop performSelector question
      • From: Chris Kane <email@hidden>
    • Re: NSRunLoop performSelector question
      • From: Dustin Voss <email@hidden>
    • Re: NSRunLoop performSelector question
      • From: "Shawn Erickson" <email@hidden>
  • Prev by Date: Re: The resize controls used un Xcode
  • Next by Date: Re: Weird error with structs and @try/@catch
  • Previous by thread: Re: NSNotificationQueue and NSNotificationCoalescingOnSender
  • Next by thread: Re: NSRunLoop performSelector question
  • Index(es):
    • Date
    • Thread