On 11/10/2011, at 10:41 AM, Jerry Krinock wrote: > However, any invocation to NSAppleScript must occur on the main thread
From the 10.6 release notes: > Thread Safety > OSA and AppleScript are now thread-safe: they may be safely called on a > non-main thread or from multiple threads without any locking in the client > code. This also applies toNSAppleScript. This does not mean that AppleScript > is totally concurrent: AppleScript uses locking to ensure that any single > connection (a ComponentInstance) will only run on one thread at a time. > Because of the size of the locking granularity, trying to manipulate the same > script from multiple threads at once may still be subject to race conditions, > and is not recommended. > > Before using a scripting component on a background thread, developers should > test the component’s “thread-safe” bit (cmpThreadSafe in the > ComponentDescription’scomponentFlags.) Test the generic component before > using OSA on a background thread, and then test the specific language > component before using it on a background thread. -- Shane Stanley <[email protected]> 'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/> _______________________________________________ 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]
