summaryrefslogtreecommitdiff
path: root/lifted-concurrent/src/Control/Concurrent/Lifted/Instrument.hs
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2019-10-18 10:35:46 +0000
committerJoe Crayne <joe@jerkface.net>2020-01-01 19:53:58 -0500
commit6e618ac54384be5ef5f2590fd2a8cc2eb8399361 (patch)
treed7ed5073eceaede55de0a5f18ce9f01217d48955 /lifted-concurrent/src/Control/Concurrent/Lifted/Instrument.hs
parentad35d7aa97d2fad2615f5d0dd4aee4e984d403f6 (diff)
forkOSLabeled
Diffstat (limited to 'lifted-concurrent/src/Control/Concurrent/Lifted/Instrument.hs')
-rw-r--r--lifted-concurrent/src/Control/Concurrent/Lifted/Instrument.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/lifted-concurrent/src/Control/Concurrent/Lifted/Instrument.hs b/lifted-concurrent/src/Control/Concurrent/Lifted/Instrument.hs
index eeda4de8..070745b6 100644
--- a/lifted-concurrent/src/Control/Concurrent/Lifted/Instrument.hs
+++ b/lifted-concurrent/src/Control/Concurrent/Lifted/Instrument.hs
@@ -4,6 +4,7 @@ module Control.Concurrent.Lifted.Instrument
4 , forkLabeled 4 , forkLabeled
5 , forkIO 5 , forkIO
6 , forkOS 6 , forkOS
7 , forkOSLabeled
7 , fork 8 , fork
8 , labelThread 9 , labelThread
9 , threadsInformation 10 , threadsInformation
@@ -50,6 +51,13 @@ forkLabeled lbl action = do
50 return t 51 return t
51{-# INLINE forkLabeled #-} 52{-# INLINE forkLabeled #-}
52 53
54forkOSLabeled :: String -> IO () -> IO ThreadId
55forkOSLabeled lbl action = do
56 t <- forkOS action
57 labelThread t lbl
58 return t
59{-# INLINE forkOSLabeled #-}
60
53forkIO :: IO () -> IO ThreadId 61forkIO :: IO () -> IO ThreadId
54forkIO = instrumented GHC.forkIO 62forkIO = instrumented GHC.forkIO
55{-# INLINE forkIO #-} 63{-# INLINE forkIO #-}