• 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
Can't get timer to fire on separate thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't get timer to fire on separate thread


  • Subject: Can't get timer to fire on separate thread
  • From: Rick Mann <email@hidden>
  • Date: Tue, 21 Oct 2014 01:15:51 -0700

I'm using CocoaHTTPServer and RoutingHTTPServer, and when a request comes in, my handler block is called on some arbitrary thread. The run loop associated with it has kCFRunLoopDefaultMode.

I have code that creates an NSTimer and invokes a block passed to it. This works fine when called from the main thread, but doesn't work when called in the HTTP server handler. So, I tried installing the timer on the current run loop with first common modes and then default mode. In neither case does it fire.

Any idea what I might be doing wrong?

--
Rick Mann
email@hidden



_______________________________________________

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: Can't get timer to fire on separate thread
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Trouble with imported enums in Swift
  • Next by Date: Re: Can't get timer to fire on separate thread
  • Previous by thread: Re: Trouble with imported enums in Swift
  • Next by thread: Re: Can't get timer to fire on separate thread
  • Index(es):
    • Date
    • Thread