Sublime Text 2 API 中的哪些操作是线程安全的?

Which operations in the Sublime Text 2 API are thread-safe?

在 Sublime Text 3 中 API, all operations are threadsafe:

Threading

All API functions are thread-safe ...

但在 Sublime Text 2 API 中,情况并非如此。正如我已经 personally learned to my displeasure,一些操作将以不可预测和 OS 相关的方式,在从主线程以外的线程调用时失败并显示消息

RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)

我可以在 Sublime Text 2 文档(强调我的)中找到关于线程安全的保证:

set_timeout(callback, delay)

Calls the given callback after the given delay (in milliseconds). Callbacks with an equal delay will be run in the order they were added. It is safe to call setTimeout from multiple threads.

但是将所有内容包装在 set_timeout 调用中是乏味且难以理解的。如果我的目标是支持 Sublime Text 2,是否还有其他 API 方法可以从主线程安全地使用,或者大量使用 set_timeout 是唯一的方法?

根据Sublime Text 3 porting guide,Sublime Text 2 中唯一线程安全的方法是set_timeout:

In Sublime Text 2, only the set_timeout method was thread-safe. In Sublime Text 3, every API method is thread-safe.