on master help sign in
Fix "thread blocked indefinitely in an MVar operation
f0f0c8bHarendra Kumar
Changelog.md+2
@@ -40,6 +40,8 @@
40### Bug Fixes
40### Bug Fixes
41
41
42* Fix a bug that caused `uniq` function to yield the same element twice.
42* Fix a bug that caused `uniq` function to yield the same element twice.
43+* Fix a bug that caused "thread blocked indefinitely in an MVar operation"
44+ exception in a parallel stream.
43
45
44### Major Enhancements
46### Major Enhancements
45
47
src/Streamly/Streams/Parallel.hs+3−1
@@ -104,7 +104,9 @@ runOneLimited st m0 winfo = go m0
104 then do
104 then do
105 liftIO $ decrementBufferLimit sv
105 liftIO $ decrementBufferLimit sv
106 foldStreamShared st yieldk single stop m
106 foldStreamShared st yieldk single stop m
107+ else do
107− else liftIO $ cleanupSVarFromWorker sv
108+ liftIO $ cleanupSVarFromWorker sv
109+ liftIO $ sendStop sv winfo
108
110
109 sv = fromJust $ streamVar st
111 sv = fromJust $ streamVar st
110
112