From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org, Eli Zaretskii <eliz@gnu.org>
Subject: Re: generic async event handlers in the event loop, for remote non-stop (was: generic `struct serial' interface pipe for remote non-stop)
Date: Fri, 24 Oct 2008 14:14:00 -0000 [thread overview]
Message-ID: <200810241512.55053.pedro@codesourcery.com> (raw)
In-Reply-To: <uy70exqqr.fsf@gnu.org>
On Friday 24 October 2008 10:54:36, Eli Zaretskii wrote:
> > From: Pedro Alves <pedro@codesourcery.com>
> > Date: Fri, 24 Oct 2008 01:32:41 +0100
> >
> > signal handlers should keep the current behaviour of having high
> > priority in relation to normal events
>
> I don't necessarily disagree, but can you explain why is that?
Sure! But, do you see a case to change that established behaviour?
We give them high priority (we delay signals until we get to the
event loop, but handle them immediatelly once we get there, we don't
delay them further) . That isn't appropriate for my event sources,
as I explained before, so we can't have it both ways in a
single mechanism.
If we change signal handlers to have as much priority as normal event
sources, then we risk the case were a signal handler is delayed further
(and indefinitely, until some another signal arrives) due to entering a
blocking call (like poll/select/wait etc.), due to handling some other
event before the signal's turn in the event loop arrives.
This current behaviour isn't super perfect, as the signal could
be marked just before entering poll/select, but, that's the current
behaviour, and should be fixed separately when there's a need. Lowering
the signal handlers priority is a step in the wrong direction, IMHO.
--
Pedro Alves
next prev parent reply other threads:[~2008-10-24 14:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-24 0:33 Pedro Alves
2008-10-24 9:56 ` Eli Zaretskii
2008-10-24 14:14 ` Pedro Alves [this message]
2008-10-24 16:40 ` Eli Zaretskii
2008-10-24 19:37 ` Pedro Alves
2008-10-24 19:41 ` Pedro Alves
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=200810241512.55053.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox