[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Delivering SIGIO when several threads are active?
From: |
Eli Zaretskii |
Subject: |
Re: Delivering SIGIO when several threads are active? |
Date: |
Fri, 30 Dec 2016 20:37:09 +0200 |
> From: Paul Eggert <address@hidden>
> 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.