Skip to content

Commit 1c7dd6e

Browse files
committed
Label leaky bucket thread
1 parent 388194c commit 1c7dd6e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Patch
2+
3+
- Label the leaky bucket thread.

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Util/LeakyBucket.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ runAgainstBucket config action = do
222222
leakingPeriodVersionTMVar <- atomically newEmptyTMVar -- see note [Leaky bucket design].
223223
tid <- myThreadId
224224
bucket <- init config
225-
withAsync (leak (readTMVar leakingPeriodVersionTMVar) tid bucket) $ \_ -> do
225+
withAsync (do
226+
labelThisThread "Leaky bucket (ouroboros-consensus)"
227+
leak (readTMVar leakingPeriodVersionTMVar) tid bucket) $ \_ -> do
226228
atomicallyWithMonotonicTime $ maybeStartThread Nothing leakingPeriodVersionTMVar bucket
227229
result <-
228230
action $

0 commit comments

Comments
 (0)