bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19776: timerfd doesn't work when busy-looping


From: Lars Ingebrigtsen
Subject: bug#19776: timerfd doesn't work when busy-looping
Date: Mon, 25 Oct 2021 17:05:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

The timerfd stuff was added in

commit 768b24eb0e880c0b39e36fd089905cdca572a758
Author:     Dmitry Antipov <dmantipov@yandex.ru>
AuthorDate: Mon Jul 28 10:28:15 2014 +0400

    On GNU/Linux, use timerfd for asynchronous timers.

so I've added Dmitry to the CCs to get some input.

Dmitry, the issue is that with timerfd, no atimers are delivered when
Emacs is busy-looping, like:

  (with-delayed-message 2 "Yes"
    (while t))

If we disable the timerfd stuff, then the timer will fire after two
seconds.  So I'm wondering whether this used to work when timerfd was
introduced (and this has regressed over the years), or whether it's
always been a design constraint that timerfd events would never be
delivered when Emacs ways busy-looping?

When Emacs is idling (and polling the fds), then the timerfd approach
works well, for instance with:

  (with-delayed-message 2 "Yes"
    (sleep-for 10))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






reply via email to

[Prev in Thread] Current Thread [Next in Thread]