slave-thread 1.1.0.1 → 1.1.0.2
raw patch · 4 files changed
+6/−5 lines, 4 filessetup-changed
Files
- Setup.hs +0/−2
- library/SlaveThread/Util/LowLevelForking.hs +1/−1
- slave-thread.cabal +1/−1
- test/Main.hs +4/−1
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
library/SlaveThread/Util/LowLevelForking.hs view
@@ -8,5 +8,5 @@ -- which does not install a default exception handler on the forked thread. {-# INLINE forkIOWithoutHandler #-} forkIOWithoutHandler :: IO () -> IO ThreadId-forkIOWithoutHandler action =+forkIOWithoutHandler (IO action) = IO $ \s -> case (fork# action s) of (# s', tid #) -> (# s', ThreadId tid #)
slave-thread.cabal view
@@ -1,5 +1,5 @@ name: slave-thread-version: 1.1.0.1+version: 1.1.0.2 synopsis: A fundamental solution to ghost threads and silent exceptions description: Vanilla thread management in Haskell is low level and
test/Main.hs view
@@ -1,6 +1,8 @@ module Main where import Prelude+import Data.List (isInfixOf)+import Data.Either (isLeft) import Test.QuickCheck.Instances import Test.Tasty import Test.Tasty.Runners@@ -33,7 +35,8 @@ finalizer1Called <- atomically (readTVar finalizer1CalledVar) assertEqual "finalizer2 not called" True finalizer2Called assertEqual "finalizer1 not called" True finalizer1Called- assertEqual "Invalid result" "Left user error (finalizer2 failed)" (show result)+ assertEqual "result is left" True (isLeft result)+ assertEqual "Invalid result" True ("finalizer2 failed" `isInfixOf` show result) , testCase "Forked threads run fine" $ do replicateM_ 100000 $ do