summaryrefslogtreecommitdiff
path: root/devdocs/elisp/processes-and-threads.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/elisp/processes-and-threads.html')
-rw-r--r--devdocs/elisp/processes-and-threads.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/devdocs/elisp/processes-and-threads.html b/devdocs/elisp/processes-and-threads.html
new file mode 100644
index 00000000..0d5e935a
--- /dev/null
+++ b/devdocs/elisp/processes-and-threads.html
@@ -0,0 +1,10 @@
+ <h4 class="subsection">Processes and Threads</h4> <p>Because threads were a relatively late addition to Emacs Lisp, and due to the way dynamic binding was sometimes used in conjunction with <code>accept-process-output</code>, by default a process is locked to the thread that created it. When a process is locked to a thread, output from the process can only be accepted by that thread. </p> <p>A Lisp program can specify to which thread a process is to be locked, or instruct Emacs to unlock a process, in which case its output can be processed by any thread. Only a single thread will wait for output from a given process at one time—once one thread begins waiting for output, the process is temporarily locked until <code>accept-process-output</code> or <code>sit-for</code> returns. </p> <p>If the thread exits, all the processes locked to it are unlocked. </p> <dl> <dt id="process-thread">Function: <strong>process-thread</strong> <em>process</em>
+</dt> <dd><p>Return the thread to which <var>process</var> is locked. If <var>process</var> is unlocked, return <code>nil</code>. </p></dd>
+</dl> <dl> <dt id="set-process-thread">Function: <strong>set-process-thread</strong> <em>process thread</em>
+</dt> <dd><p>Set the locking thread of <var>process</var> to <var>thread</var>. <var>thread</var> may be <code>nil</code>, in which case the process is unlocked. </p></dd>
+</dl><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Processes-and-Threads.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Processes-and-Threads.html</a>
+ </p>
+</div>