Commit 65dbe3d
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 6d1c4a1 commit 65dbe3d
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
278 | 284 | | |
279 | 285 | | |
280 | 286 | | |
| |||
0 commit comments