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 protected])

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