all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: No thread yield when using synchronous processes?
Date: Wed, 12 Dec 2018 23:35:59 +0100	[thread overview]
Message-ID: <CAArVCkRah0cUqwFbqdWMRcF6AaRa_h+67FG9=u68xy1hu4C3tw@mail.gmail.com> (raw)

Hi,

it seems like Emacs doesn't yield when using synchronous processes:

(make-thread (lambda () (call-process "sleep" nil nil nil "5s")))

⇒ Emacs freezes for 5 seconds.

Is there a reason for this behavior? The manual claims that Emacs
yields when waiting for process output, but that only seems to be the
case for asynchronous processes. It's of course possible to simulate
synchronous processes with asynchronous processes, but the
asynchronous process API is more difficult to use.

Thanks,
Philipp



             reply	other threads:[~2018-12-12 22:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12 22:35 Philipp Stephani [this message]
2018-12-13  9:47 ` No thread yield when using synchronous processes? Michael Albinus
2018-12-13 13:45   ` Eli Zaretskii
2018-12-22 22:50     ` Philipp Stephani
2018-12-22 22:48   ` Philipp Stephani
2018-12-23  8:07     ` Michael Albinus
2018-12-23  9:58       ` Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkRah0cUqwFbqdWMRcF6AaRa_h+67FG9=u68xy1hu4C3tw@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.