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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to