Commit 670399b
fix: resolve parDemuxScan deadlock when worker throws with full buffer
Signal the driver thread when a worker exception occurs so it can wake
up from blocking on a full input buffer. Previously sendExceptionToDriver
only wrote to the output queue, leaving the driver stuck on takeMVar.
- Set closedForInput and signal inputSpaceDoorBell in sendExceptionToDriver
- Add regression test with slow single-key worker that throws mid-stream
- Test confirms original exception propagates instead of BlockedIndefinitelyOnMVar1 parent d1b75d4 commit 670399b
3 files changed
Lines changed: 43 additions & 0 deletions
File tree
- docs/User/Project
- src/Streamly/Internal/Data/Fold/Channel
- test/Streamly/Test/Data/Scanl
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
| 317 | + | |
316 | 318 | | |
317 | 319 | | |
318 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
106 | 138 | | |
107 | 139 | | |
108 | 140 | | |
| |||
118 | 150 | | |
119 | 151 | | |
120 | 152 | | |
| 153 | + | |
| 154 | + | |
0 commit comments