Skip to content

Commit

Permalink
compatibility fix with 9.4+
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Wallace committed Dec 19, 2022
1 parent 649e53e commit c5b8e82
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Control/Concurrent/Async/Pool/Async.hs
Original file line number Diff line number Diff line change
Expand Up @@ -723,10 +723,18 @@ tryAll = try
-- exception handler.
{-# INLINE rawForkIO #-}
rawForkIO :: IO () -> IO ThreadId
#if MIN_VERSION_base(4,17,0)
rawForkIO (IO action) = IO $ \ s ->
#else
rawForkIO action = IO $ \ s ->
#endif
case (fork# action s) of (# s1, tid #) -> (# s1, ThreadId tid #)

{-# INLINE rawForkOn #-}
rawForkOn :: Int -> IO () -> IO ThreadId
#if MIN_VERSION_base(4,17,0)
rawForkOn (I# cpu) (IO action) = IO $ \ s ->
#else
rawForkOn (I# cpu) action = IO $ \ s ->
#endif
case (forkOn# cpu action s) of (# s1, tid #) -> (# s1, ThreadId tid #)

0 comments on commit c5b8e82

Please sign in to comment.