Commit 596bef6
committed
Avoid BusyIndicator putting Display to sleep after being done
Due to a race condition between the BusyIndicator's event loop spinning
and the display.wake() call performed after the future to wait for is
done, the BusyIndicator execution may get stuck in a display.sleep()
call. While on Windows and MacOS the wake() call will effectively still
ensure that display.sleep() return immediately if invoked
display.sleep() was called, this is neither guaranteed nor does that
happen on Linux.
This fixes the race condition by replacing the wake() call in the future
with scheduling an empty task that ensures that the event queue remains
spinned (like everywhere else).
Contributes to
#30441 parent 0f991b5 commit 596bef6
File tree
1 file changed
+9
-3
lines changed- bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom
1 file changed
+9
-3
lines changedLines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
114 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
115 | 121 | | |
116 | | - | |
117 | | - | |
| 122 | + | |
| 123 | + | |
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
| |||
0 commit comments