Function: all-threads

all-threads is a function defined in thread.c.

Signature

(all-threads)

Documentation

Return a list of all the live threads.

Source Code

// Defined in /usr/src/emacs/src/thread.c
{
  Lisp_Object result = Qnil;
  struct thread_state *iter;

  for (iter = all_threads; iter; iter = iter->next_thread)
    {
      if (thread_live_p (iter))
	{
	  Lisp_Object thread;

	  XSETTHREAD (thread, iter);
	  result = Fcons (thread, result);
	}
    }

  return result;
}