diff options
author | Joe Crayne <joe@jerkface.net> | 2019-12-13 12:06:06 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-01 23:25:22 -0500 |
commit | 5b9374c79de82025bbb0ce47e0a93e6ddc0ece6c (patch) | |
tree | 195794aa0b41e0859826e9c7b9b97cd461cf88fd /tasks/src/Control/Concurrent/Tasks.hs | |
parent | 7f2fab398bbbb3f02822d5692c1b6dc07039d036 (diff) |
Quicker forkTask thread label.
Diffstat (limited to 'tasks/src/Control/Concurrent/Tasks.hs')
-rw-r--r-- | tasks/src/Control/Concurrent/Tasks.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tasks/src/Control/Concurrent/Tasks.hs b/tasks/src/Control/Concurrent/Tasks.hs index da2e589e..73c8152e 100644 --- a/tasks/src/Control/Concurrent/Tasks.hs +++ b/tasks/src/Control/Concurrent/Tasks.hs | |||
@@ -29,10 +29,10 @@ withTaskGroup glabel numslots action = do | |||
29 | writeTVar cnt (succ slot) | 29 | writeTVar cnt (succ slot) |
30 | t <- readTChan tg | 30 | t <- readTChan tg |
31 | return (slot,t) | 31 | return (slot,t) |
32 | _ <- fork $ do | 32 | t <- fork $ do |
33 | myThreadId >>= flip labelThread (intercalate "." [glabel,show slot,lbl]) | ||
34 | task `catch` (\(SomeException e) -> return ()) | 33 | task `catch` (\(SomeException e) -> return ()) |
35 | atomically $ modifyTVar' cnt pred | 34 | atomically $ modifyTVar' cnt pred |
35 | labelThread t (intercalate "." [glabel,show slot,lbl]) | ||
36 | again | 36 | again |
37 | action (TaskGroup tg) `onException` killThread thread | 37 | action (TaskGroup tg) `onException` killThread thread |
38 | atomically $ do | 38 | atomically $ do |