Repository navigation
Commit 8c3f650
committed
ci(bun): exit a Bun worker once it has ended, so the pool replaces it
Ending a worker only removes its message listener; the thread leaves only if
that was its last handle. A jest worker that leaked one therefore stayed alive
in the RESTARTING state forever — reproduced with a worker holding a timer:
the idle-memory limit tripped (1.63 MB over a 1 MB limit), the restart was
requested, and the next task still ran on the same thread. The limit had
become a no-op for that worker, which is the one thing it exists to do.
The worker now exits itself after teardown, on Bun only. Same reproduction:
the state returns to `ok` and the next task runs on a new thread.1 parent 017beed commit 8c3f650
2 files changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
341 | 343 | | |
342 | 344 | | |
343 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | | - | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
0 commit comments