Commit 26aa9be
committed
hls-graph: simplify AIO; scoped cancellation; fewer threads; safe cleanup
- Replace ad-hoc AIO with structured concurrency (TVar + async registry); builder returns results directly; remove lazy splitIO/unsafePerformIO
- Reduce redundant thread creation; use per-key builderOne and STM retry instead of spawning; fewer races
- Add AsyncParentKill (ThreadId, Step) and treat it as async; use cancelWith from Shake to scope cancellation to the current session
- Mask critical sections and do uninterruptible cleanup on exception (mark Dirty) to avoid stuck Running and hangs
- Adjust types/wiring (Running payload, runAIO takes Step, compute/refresh signatures); minor tweaks in ghcide Shake/Plugin.Test
Fixes haskell#47181 parent 1263b9f commit 26aa9be
File tree
6 files changed
+129
-175
lines changed- ghcide/src/Development/IDE
- Core
- Plugin
- hls-graph/src/Development/IDE/Graph
- Internal
6 files changed
+129
-175
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
110 | | - | |
111 | | - | |
| 109 | + | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
| |||
130 | 128 | | |
131 | 129 | | |
132 | 130 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | 131 | | |
137 | 132 | | |
138 | 133 | | |
139 | 134 | | |
140 | 135 | | |
141 | | - | |
142 | 136 | | |
143 | 137 | | |
144 | 138 | | |
| |||
149 | 143 | | |
150 | 144 | | |
151 | 145 | | |
152 | | - | |
| 146 | + | |
| 147 | + | |
153 | 148 | | |
154 | 149 | | |
155 | 150 | | |
156 | 151 | | |
157 | 152 | | |
158 | | - | |
159 | | - | |
160 | | - | |
| 153 | + | |
161 | 154 | | |
162 | 155 | | |
163 | | - | |
164 | 156 | | |
165 | 157 | | |
166 | 158 | | |
| |||
169 | 161 | | |
170 | 162 | | |
171 | 163 | | |
172 | | - | |
173 | 164 | | |
174 | 165 | | |
175 | 166 | | |
| |||
179 | 170 | | |
180 | 171 | | |
181 | 172 | | |
182 | | - | |
183 | 173 | | |
184 | 174 | | |
185 | 175 | | |
| |||
948 | 938 | | |
949 | 939 | | |
950 | 940 | | |
951 | | - | |
| 941 | + | |
| 942 | + | |
952 | 943 | | |
953 | 944 | | |
954 | 945 | | |
| |||
989 | 980 | | |
990 | 981 | | |
991 | 982 | | |
| 983 | + | |
992 | 984 | | |
993 | | - | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
994 | 988 | | |
995 | 989 | | |
996 | 990 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
0 commit comments