Skip to content

glib/gmain: timerfd for sub-msec poll timeout

Christian Hergert requested to merge wip/chergert/gmain-timerfd into main

When using poll() directly, the best we can get is 1 millisecond timing intervals. This allows using a timerfd(2) in conjunction with g_source_set_ready_time().

Fixes #3277 (closed)

Note

This is marked as draft as I've not really done much testing on it, only what it would take to make this work. gtk4-demo runs fine, but I haven't tested things like mutter to see how it affects the dispatch timing of ClutterFrameClock.

Help in testing, and help in deciding if this is something we want in GLib directly is much appreciated.

Merge request reports