Skip to content

fix: use blocking GLib main context iteration to prevent CPU busy-spin#133

Draft
KKoukiou wants to merge 2 commits into
mainfrom
rhbz#2344225
Draft

fix: use blocking GLib main context iteration to prevent CPU busy-spin#133
KKoukiou wants to merge 2 commits into
mainfrom
rhbz#2344225

Conversation

@KKoukiou

Copy link
Copy Markdown

GLibEventLoop._iterate_event_loop was calling context.iteration(False), which returns immediately when no events are pending. When process_signals(return_after=...) loops waiting for a signal that takes minutes to arrive (e.g. installation completion in anaconda TUI), this causes a 100% CPU busy-spin.

Change the default to blocking iteration (may_block=True) so the GLib context sleeps until a source fires. Add a blocking parameter to the constructor so tests can opt into non-blocking mode.

Resolves: rhbz#2344225

KKoukiou added 2 commits July 16, 2026 17:02
GLibEventLoop._iterate_event_loop was calling context.iteration(False),
which returns immediately when no events are pending. When
process_signals(return_after=...) loops waiting for a signal that takes
minutes to arrive (e.g. installation completion in anaconda TUI), this
causes a 100% CPU busy-spin.

Change the default to blocking iteration (may_block=True) so the GLib
context sleeps until a source fires. Add a blocking parameter to the
constructor so tests can opt into non-blocking mode.

Resolves: rhbz#2344225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant