File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -177,11 +177,11 @@ muxStart tracer (MuxApplication ptcls) bearer = do
177
177
178
178
muxerJob tq cnt =
179
179
JobPool. Job (mux cnt MuxState { egressQueue = tq, Egress. bearer })
180
- MuxerException
180
+ MuxerException " muxer "
181
181
182
182
demuxerJob tbl =
183
183
JobPool. Job (demux DemuxState { dispatchTable = tbl, Ingress. bearer })
184
- DemuxerException
184
+ DemuxerException " demuxer "
185
185
186
186
miniProtocolInitiatorJob = miniProtocolJob selectInitiator ModeInitiator
187
187
miniProtocolResponderJob = miniProtocolJob selectResponder ModeResponder
@@ -216,6 +216,7 @@ muxStart tracer (MuxApplication ptcls) bearer = do
216
216
where
217
217
job run = JobPool. Job (jobAction run)
218
218
(MiniProtocolException pnum pix pmode)
219
+ ((show pix) ++ " ." ++ (show pmode))
219
220
220
221
jobAction run = do
221
222
chan <- mkChannel
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ data JobPool m a = JobPool {
28
28
completionQueue :: ! (TQueue m a )
29
29
}
30
30
31
- data Job m a = Job (m a ) (SomeException -> a )
31
+ data Job m a = Job (m a ) (SomeException -> a ) String
32
32
33
33
withJobPool :: forall m a b .
34
34
(MonadAsync m , MonadThrow m )
@@ -52,12 +52,13 @@ forkJob :: forall m a.
52
52
=> JobPool m a
53
53
-> Job m a
54
54
-> m ()
55
- forkJob JobPool {jobsVar, completionQueue} (Job action handler) =
55
+ forkJob JobPool {jobsVar, completionQueue} (Job action handler label ) =
56
56
mask $ \ restore -> do
57
57
jobAsync <- async $ do
58
+ tid <- myThreadId
59
+ labelThread tid label
58
60
res <- handleJust notAsyncExceptions (return . handler) $
59
61
restore action
60
- tid <- myThreadId
61
62
atomically $ do
62
63
writeTQueue completionQueue res
63
64
modifyTVar' jobsVar (Map. delete tid)
You can’t perform that action at this time.
0 commit comments