Re: NSRecursiveLock problems
Re: NSRecursiveLock problems
- Subject: Re: NSRecursiveLock problems
- From: Bill Bumgarner <email@hidden>
- Date: Tue, 22 Dec 2009 11:22:13 -0800
On Dec 22, 2009, at 11:19 AM, PCWiz wrote:
> Is there any easy way to execute a portion of code on the main thread without going through the mess of delegates and selectors?
Delegates have *nothing* to do with main thread execution. Selectors a bit orthogonal, too.
If you want to execute something on the main thread, I would suggest using NSOperationQueue's notion of main queue and enqueuing an operation with a block:
- (void)addOperationWithBlock:(void (^)(void))block
Quite straightforward.
b.bum
_______________________________________________
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