@@ -334,17 +334,7 @@ newFoldSVar stt f = do
334334 -- Add the producer thread-id to the SVar.
335335 liftIO myThreadId >>= modifyThread sv
336336
337− -- XXX move this in fromProducer itself.
338− --
339− -- A wrapper to send a Stop event back to the producer when the fold
340− -- receives a stop from the producer.
341− let pull m = mkStream $ \st yld _ stp -> do
342− let stop = sendStopToProducer sv >> stp
343− single a = yld a (K.nilM (sendStopToProducer sv))
344− yieldk a r = yld a (pull r)
345− in foldStreamShared st yieldk single stop m
346−
347− void $ doFork (void $ f $ fromStream $ pull $ fromProducer sv)
337+ void $ doFork (void $ f $ fromStream $ fromProducer sv)
348338 (svarMrun sv)
349339 (handleFoldException sv)
350340 return sv