async-pool icon indicating copy to clipboard operation
async-pool copied to clipboard

Nested calls to mapTasks hang indefinitely

Open maksar opened this issue 1 year ago • 1 comments

test/main.hs has the following test, which passes

      it "nested mapTasks work" $ withTaskGroup 1 $ \p -> do
          mapTasks p ([mapTasks p [pure ()]])
          True `shouldBe` True

However, that test hangs indefinitely (fails with test: thread blocked indefinitely in an MVar operation):

      it "nested mapTasks work" $ withTaskGroup 1 $ \p -> do
          mapTasks p ([mapTasks p [pure ()], mapTasks p [pure ()]])
          True `shouldBe` True

maksar avatar May 20 '24 08:05 maksar

Looks like https://github.com/jwiegley/async-pool/pull/26 (attempt to fix https://github.com/jwiegley/async-pool/issues/4) wasn't robust enough @l29ah

maksar avatar May 20 '24 09:05 maksar