Repository navigation
Commit 658d607
committed
fix: use blocking GLib main context iteration to prevent CPU busy-spin
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#23442251 parent 62f1cd1 commit 658d607
2 files changed
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
211 | | - | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | | - | |
| 214 | + | |
217 | 215 | | |
218 | 216 | | |
219 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
0 commit comments