• 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
Re: Asynchronous timers (without a run loop)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asynchronous timers (without a run loop)


  • Subject: Re: Asynchronous timers (without a run loop)
  • From: Eric Schlegel <email@hidden>
  • Date: Fri, 05 Dec 2008 20:25:45 -0800


On Dec 5, 2008, at 3:22 PM, Påhl Melin wrote:

I didn't really decide I shouldn't use a run loop for the timers. I am
porting a library from another platform and just wanted a quick answer
if I could get a similar timer API behavior in either Cocoa, Core
Foundation or BSD Unix (with a preference on low-level for
efficiency), as I was already using. It would save me time and make
the resulting code simpler and probably more robust (since I'm not an
Cocoa/CF expert).

In the spirit of helping to ask better questions...

I think the key piece of information that you left out in your original question was the API you were using on .Net, and the behavior you got - that your timer was called on a separate thread, _not_ the thread that installed the timer. Given that information, it would be easy to direct you at simply creating a separate thread and using either NSTimer or CFRunLoopTimer to install your timers, which would be called on the separate thread, exactly as on .Net.

-eric

_______________________________________________

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


References: 
 >Asynchronous timers (without a run loop) (From: "Påhl Melin" <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: "Påhl Melin" <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: Joseph Kelly <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: "Påhl Melin" <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: "Julien Jalon" <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: "Påhl Melin" <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: Sherm Pendley <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: "Påhl Melin" <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: Sherm Pendley <email@hidden>)
 >Re: Asynchronous timers (without a run loop) (From: "Påhl Melin" <email@hidden>)

  • Prev by Date: Re: What are the limitations of Dot Syntax?
  • Next by Date: Re: Questions about [NSApplication run]
  • Previous by thread: Re: Asynchronous timers (without a run loop)
  • Next by thread: Re: Asynchronous timers (without a run loop)
  • Index(es):
    • Date
    • Thread