• 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: Using Notifiers for a non-CFRunLooped app ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Using Notifiers for a non-CFRunLooped app ??
      • From: Quinn <email@hidden>
References: 
 >Re: Using Notifiers for a non-CFRunLooped app ?? (From: Quinn <email@hidden>)

  • Prev by Date: Re: UDP and OT
  • Next by Date: Re: Using Notifiers for a non-CFRunLooped app ??
  • Previous by thread: Re: Using Notifiers for a non-CFRunLooped app ??
  • Next by thread: Re: Using Notifiers for a non-CFRunLooped app ??
  • Index(es):
    • Date
    • Thread