diff options
Diffstat (limited to 'lifted-concurrent/src')
-rw-r--r-- | lifted-concurrent/src/Control/Concurrent/Lifted/Instrument.hs | 8 |
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 | ||
54 | forkOSLabeled :: String -> IO () -> IO ThreadId | ||
55 | forkOSLabeled lbl action = do | ||
56 | t <- forkOS action | ||
57 | labelThread t lbl | ||
58 | return t | ||
59 | {-# INLINE forkOSLabeled #-} | ||
60 | |||
53 | forkIO :: IO () -> IO ThreadId | 61 | forkIO :: IO () -> IO ThreadId |
54 | forkIO = instrumented GHC.forkIO | 62 | forkIO = instrumented GHC.forkIO |
55 | {-# INLINE forkIO #-} | 63 | {-# INLINE forkIO #-} |