Why NSAppleScript is thread-safety but used only from main-thread?

There are two docs(as url at the end) describing NSAppleScript about using on thread, but I confuse that why NSAppleScript is thread-safety but used only from main-thread? Who can specify the difference between them? Appliciate!


https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html

https://developer.apple.com/library/content/releasenotes/AppleScript/RN-AppleScript/RN-10_6/RN-10_6.html

Replies

They do not say it is threadSafe.


In first doc

h ttps://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html


they state :

Main Thread Only Classes

The following class must be used only from the main thread of an application.

NSAppleScript


In the second,

h ttps://developer.apple.com/library/content/releasenotes/AppleScript/RN-AppleScript/RN-10_6/RN-10_6.html

they explain that you can now run several instances of NSAppleScript safely, but do not tell it is threadSafe

AppleScript Editor is now more responsive while running a script, and can run several scripts simultaneously. Previous versions would let you start running a second script, but the first one would pause until the second one finished. It does this by running scripts on background threads. If this causes trouble, typically because a third-party scripting addition has claimed to be thread-safe but isn’t, you can force the script to run on the main thread by holding the Control key and selecting the Run command, which will show as “Run in Foreground” in the menu.

So it is,

Thank you for explaining so detaily.

Good. And please, don't forget to close the thread.