On May 15, 2008, at 12:16 PM, ben syverson wrote:
On May 15, 2008, at 1:47 PM, Bill Bumgarner wrote:
Run an NSRunLoop on your main thread. That'll support - performSelectorOnMainThread:.

Okay -- interesting. One follow-up question... my core loop is basically:

while(_running) {
        // do stuff
}

I don't want to listen to any input, and I want the loop to execute as fast as possible. However, NSRunLoop says I need to set a timer or an input...

Your main thread loop?

If that is the design you want to use, then you can use NSLock -- NSConditionLock, typically -- to do the synchronization between threads. If your loop really is running flat out, then using a condition lock will be marginally faster.

b.bum

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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