diff options
author | James Crayne <jim.crayne@gmail.com> | 2019-10-18 10:35:46 +0000 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-01 19:53:58 -0500 |
commit | 6e618ac54384be5ef5f2590fd2a8cc2eb8399361 (patch) | |
tree | d7ed5073eceaede55de0a5f18ce9f01217d48955 /lifted-concurrent/src/Control/Concurrent/Lifted/Instrument.hs | |
parent | ad35d7aa97d2fad2615f5d0dd4aee4e984d403f6 (diff) |
forkOSLabeled
Diffstat (limited to 'lifted-concurrent/src/Control/Concurrent/Lifted/Instrument.hs')
-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 #-} |