Commit 19d05a9
committed
fix: clean up partial workers if start_processes fails in __enter__
Python skips __exit__ when __enter__ raises, so an exception mid-startup
would leak any workers already spawned. Wrap the call so stop_processes()
runs before the exception propagates.1 parent 6da785e commit 19d05a9
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
333 | 339 | | |
334 | 340 | | |
335 | 341 | | |
| |||
0 commit comments