文档里甚至连如何获取这个 thread 对象的方法都没有(类似process的 get-process
),只能 all-threads
获取所有对象。
此外关于 thread-signal
thread-yield
thread-join
有没有使用的例子可以参考一下的?
在邮件列表里找到一个~
http://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00620.html
文档里甚至连如何获取这个 thread 对象的方法都没有(类似process的 get-process
),只能 all-threads
获取所有对象。
此外关于 thread-signal
thread-yield
thread-join
有没有使用的例子可以参考一下的?
在邮件列表里找到一个~
http://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00620.html
一个不太相关但是可以注意的问题 https://www.reddit.com/r/emacs/comments/8wb7c9/using_emacs_threads_to_execute_commands/ People who want to try this kind of setup should keep in mind one more limitation of the current threads implementation: when the Lisp code run in a thread signals an error, the thread silently dies. “
还有echo area message的问题,如果thread需要输入,那么差不多emacs就宕掉了;
如果thread 调用 emacs的primary function, 好像也是会让emacs hold, 比如 dired-do-copy调用的copy-file