Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Control/Concurrent/Async/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import Data.IORef

import GHC.Exts
import GHC.IO hiding (finally, onException)
import GHC.Conc (ThreadId(..))
import GHC.Conc (ThreadId(..), labelThread)

-- -----------------------------------------------------------------------------
-- STM Async API
Expand Down Expand Up @@ -504,6 +504,7 @@ linkOnly
linkOnly shouldThrow a = do
me <- myThreadId
void $ forkRepeat $ do
myThreadId >>= flip labelThread ("linkOnly " ++ show (asyncThreadId a) ++ " -> " ++ show me)
r <- waitCatch a
case r of
Left e | shouldThrow e -> throwTo me (ExceptionInLinkedThread a e)
Expand Down Expand Up @@ -684,6 +685,7 @@ concurrently' left right collect = do
-- putMVar.
when (count' > 0) $
void $ forkIO $ do
myThreadId >>= flip labelThread "concurrent stop"
throwTo rid AsyncCancelled
throwTo lid AsyncCancelled
-- ensure the children are really dead
Expand Down