Function: set-process-thread
set-process-thread is a function defined in process.c.
Signature
(set-process-thread PROCESS THREAD)
Documentation
Set the locking thread of PROCESS to be THREAD.
If THREAD is nil, the process is unlocked.
Source Code
// Defined in /usr/src/emacs/src/process.c
{
struct Lisp_Process *proc;
struct thread_state *tstate;
CHECK_PROCESS (process);
if (NILP (thread))
tstate = NULL;
else
{
CHECK_THREAD (thread);
tstate = XTHREAD (thread);
}
proc = XPROCESS (process);
pset_thread (proc, thread);
eassert (proc->infd < FD_SETSIZE);
if (proc->infd >= 0)
fd_callback_info[proc->infd].thread = tstate;
eassert (proc->outfd < FD_SETSIZE);
if (proc->outfd >= 0)
fd_callback_info[proc->outfd].thread = tstate;
return thread;
}