Re: Crash in NSControl's sizeToFit
Re: Crash in NSControl's sizeToFit
- Subject: Re: Crash in NSControl's sizeToFit
- From: Joar Wingfors <email@hidden>
- Date: Mon, 1 Feb 2010 08:28:20 -0800
You're not allowed to do *anything* on non-main threads unless the documentation *explicitly* says that it's OK. You should approach this subject with great caution and restraint. If you can't prove that something is safe, assume that it's not, and stay away from it.
j o a r
On 1 feb 2010, at 08.16, email@hidden wrote:
> Quick followup: is it safe to set the token field's object value from
> the background thread, or do I need to do it on the main thread as
> well? Or to put it in more general terms: are _all_ calls to AppKit
> from a background thread disallowed, or only those regarding updating
> the UI?
>
> Also, is it thread-safe to bracket the sizeToFit method between
> lockFocusIfCanDraw and unlockFocus, rather than performing the
> resizing on the main thread?
_______________________________________________
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