Re: NSRunLoop / CFRunLoop
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