Re: Display Dialog
Re: Display Dialog
- Subject: Re: Display Dialog
- From: Stan Cleveland <email@hidden>
- Date: Fri, 17 Dec 2010 14:36:36 -0800
On Dec 17, 2010, at 2:23 PM, Shane Stanley wrote:
> On 18/12/10 7:59 AM, "Stan Cleveland" <email@hidden> wrote:
>
>> That's because 'display dialog' is not thread-safe
>
> It's not to do with thread safety, but rather the fact that a modal dialog
> is simple and makes sense. Anything else would open a can of worms...
Really? To quote the AS release notes for OS 10.6:
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 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.... Since a scripting addition can contain arbitrary code, a given addition command may or may not be thread-safe: 'offset of' is, for example, but 'display dialog' is not. For compatibility, addition commands are presumed to be thread-unsafe, and will be executed on the main thread.
There's more there about thread safety, but that's the pertinent bit. Perhaps I'm misreading it?
Stan C. _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden