Commit 2ac167b
Reject zero or negative SMOL_THREADS value (#382)
SMOL_THREADS=0 creates a range 1..=0 which yields no worker
threads, causing tasks spawned with smol::spawn to hang forever.
Non-numeric values already fall back to 1 because parse fails,
but 0 parsed successfully and produced an empty range.
Add .filter(|&n| n > 0) so that a zero value falls back to
the default of 1, matching the behavior for invalid values.
Closes #381
Co-authored-by: CommandCodeBot <noreply@commandcode.ai>1 parent 6176d8e commit 2ac167b
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
0 commit comments