• 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: NSRunLoop / CFRunLoop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRunLoop / CFRunLoop


  • Subject: Re: NSRunLoop / CFRunLoop
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Fri, 13 Feb 2009 23:03:05 +0100


Le 13 févr. 09 à 21:54, Alexander Cohen a écrit :

Hi,

Not sure if this is the right place to ask since my question is about CFRunLoop, not Cocoa but CoreFoundation. If not, please direct me to the right list.

I'm looking for a way to get the main CFRunLoop on tiger. On leopard, there is a simple call for it but i'm stuck with tiger for now. And while i'm at it, i'd like to do something like [obj performSelectorOnMainThread...] in CoreFoundation using CFRunLoops. I'm sure it's possible but i'm not sure where to start.

thx

To get the main runloop, you can save it in a global variable at program startup, and return it when requested.


There is no easy way to mimic performSelectorOnMainThread: as there is no easy way to serialize a function call (unlike in Cocoa where you can easily serialize a method call using NSInvocation to send it on the main thread).

To do inter-thread messaging using only low-level frameworks, you are stuck with the traditional facilities (socket, pipes, etc.)

Just by curiosity, what prevent you to use the Foundation framework ?

_______________________________________________

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: NSRunLoop / CFRunLoop
      • From: Alexander Cohen <email@hidden>
References: 
 >NSRunLoop / CFRunLoop (From: Alexander Cohen <email@hidden>)

  • Prev by Date: Re: Converting a CMYK NSImage to RGB
  • Next by Date: NSTableView crash when selected.
  • Previous by thread: NSRunLoop / CFRunLoop
  • Next by thread: Re: NSRunLoop / CFRunLoop
  • Index(es):
    • Date
    • Thread