Re: Using Notifiers for a non-CFRunLooped app ??
Re: Using Notifiers for a non-CFRunLooped app ??
- Subject: Re: Using Notifiers for a non-CFRunLooped app ??
- From: Jérome Foucher <email@hidden>
- Date: Thu, 12 Dec 2002 14:20:33 +0100
On jeudi, dic 12, 2002, at 13:34 Europe/Paris, Quinn wrote:
At 11:49 +0100 12/12/02, Jirome Foucher wrote:
But my app does not use CFRunLoop as it's based on PowerPlant. Is it
a problem ?
No. All Carbon and Cocoa applications are ultimately based on a
CFRunLoop. In the case of a PowerPlant app, PP eventually calls WNE,
which internally is implemented on top of a CFRunLoop. So, you can
just add your SCF runloop source into the current runloop (as returned
by CFRunLoopGetCurrent) and, voila, your SCF callbacks will be called
at 'system task' time (ie on the main thread).
Thanks for the info Quinn. I was not aware that WNE was implemented on
top of a CFRunLoop. Very interesting....
And indeed I managed to make it work.
One thing to notice however, is that the registration of these
callbacks HAS to be done in the main thread... at least for me. If I
register them in another thread, no error occurs, but the callbacks are
never called.
Jerome
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.