• 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
unable to break out of runloop because timers are fired and then the loop waits
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unable to break out of runloop because timers are fired and then the loop waits


  • Subject: unable to break out of runloop because timers are fired and then the loop waits
  • From: Jason Bobier <email@hidden>
  • Date: Wed, 24 Sep 2008 15:15:12 -0400

Hey folks, I have a runloop on a thread that looks like this:

while (! _cancelled) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

[runloop runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
[pool release];
}


And I put a timer in the loop that sets _cancelled to true, the runloop never stops. What's the proper way to do this?

Thanks,

Jason
_______________________________________________

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


  • Follow-Ups:
    • Re: unable to break out of runloop because timers are fired and then the loop waits
      • From: Muraviev Dmitry <email@hidden>
    • Re: unable to break out of runloop because timers are fired and then the loop waits
      • From: Jason Coco <email@hidden>
    • Re: unable to break out of runloop because timers are fired and then the loop waits
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Just how accurate is timeIntervalSinceReferenceDate ?
  • Next by Date: Re: Unable to launch about panel for the 2nd time
  • Previous by thread: Just how accurate is timeIntervalSinceReferenceDate ?
  • Next by thread: Re: unable to break out of runloop because timers are fired and then the loop waits
  • Index(es):
    • Date
    • Thread