Commit ec6afb9
worker: correct (de)initialization order
- Initialize `thread_exit_async_` only once the thread has been
started. This is done since it is only triggered from the
thread when it is exiting.
- Move the final `uv_run` to the `Worker` destructor.
This makes sure that it is always run, regardless of whether
the thread is actually started or not.
- Always dispose the `Isolate` before cleaning up the libuv event
loop. This now matches the reverse order of initialization.
Fixes: #22736
PR-URL: #22773
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 535c30c commit ec6afb9
File tree
2 files changed
+37
-13
lines changed- src
- test/parallel
2 files changed
+37
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 74 | | |
83 | 75 | | |
84 | 76 | | |
| |||
242 | 234 | | |
243 | 235 | | |
244 | 236 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | 237 | | |
249 | 238 | | |
250 | 239 | | |
| |||
256 | 245 | | |
257 | 246 | | |
258 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
259 | 255 | | |
260 | 256 | | |
261 | 257 | | |
| |||
331 | 327 | | |
332 | 328 | | |
333 | 329 | | |
334 | | - | |
335 | 330 | | |
336 | 331 | | |
337 | 332 | | |
338 | 333 | | |
339 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
363 | 373 | | |
364 | 374 | | |
365 | 375 | | |
366 | | - | |
367 | 376 | | |
368 | 377 | | |
369 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments