Open temyurchenko opened 3 years ago
Suppose, I have the following piece of code
import Control.Concurrent.Async.Pool (Concurrently(..), withTaskGroup) main :: IO () main = do let xs = [1, 2, 3, 5, 6] :: [Int] s <- withTaskGroup 4 (runConcurrently (sum <$> traverse (Concurrently . const . pure) xs)) print s
It hangs whenever the pool size is lesser than the number of tasks. E.g. the code above hangs, but if we change pool size from 4 to 5, it doesn't.
This appears to be a duplicate of #7
It seems so, but #7 is closed and the underlying issue with Concurrently is not fixed.
Concurrently
Suppose, I have the following piece of code
It hangs whenever the pool size is lesser than the number of tasks. E.g. the code above hangs, but if we change pool size from 4 to 5, it doesn't.