unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Delivering SIGIO when several threads are active?
Date: Fri, 30 Dec 2016 20:37:09 +0200	[thread overview]
Message-ID: <83wpehs1pm.fsf@gnu.org> (raw)
In-Reply-To: <8e01d8c5-66fa-fcb8-ef0e-74ca10a72317@cs.ucla.edu> (message from Paul Eggert on Fri, 30 Dec 2016 09:54:01 -0800)

> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Fri, 30 Dec 2016 09:54:01 -0800
> 
> Eli Zaretskii wrote:
> > When SIGIO is received by some thread, we currently deliver it to the
> > main thread, see deliver_input_available_signal and
> > deliver_process_signal.  Is that appropriate when more than one thread
> > is active?
> 
> Such signals have been delivered to the main thread for quite some time, and 
> this has worked well enough; is there something different about the concurrency 
> code that now makes this behavior inappropriate?

I don't know, that's why I asked.  For example, what if another thread
is waiting on the keyboard descriptor and wants to handle keyboard
input, or wants to receive X events?

> On GNU/Linux, process signals get sent to the main thread unless the main thread 
> is blocking them (or if a few less-common situations arise, e.g., the main 
> thread is exiting).

And what happens in those exceptional cases?

> Hmm, I see that the recent changes use mixed terminology. Until now, Emacs has 
> called the initial thread the "main thread", but the recent code sometimes calls 
> it the "primary thread". We shouldn't have two names for the same thing. I'll 
> look into fixing that.

"Primary thread" is the name of the main thread.



  reply	other threads:[~2016-12-30 18:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-30 10:25 Delivering SIGIO when several threads are active? Eli Zaretskii
2016-12-30 17:54 ` Paul Eggert
2016-12-30 18:37   ` Eli Zaretskii [this message]
2016-12-30 21:05     ` Paul Eggert
2016-12-30 21:45       ` Paul Eggert

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83wpehs1pm.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).