raboof / notion

Tiling tabbed window manager
https://notionwm.net/
GNU Lesser General Public License v2.1
268 stars 63 forks source link

Fix potential livelock in do_timer_set #302

Closed dnr closed 3 years ago

dnr commented 3 years ago

The old code makes all timers interval timers, with the interval equal to the initial delay, no matter how short the initial delay is (even 1µs). On some systems, this can cause so many signals to be delivered that the code that resets the timer never gets to run.

The timer is theoretically one-shot; the interval part is only for if we miss the signal due to a race condition. So we can use a fixed small delay for the interval.

Fixes #213