Skip to content

Commit

Permalink
Label leaky bucket thread
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Jan 24, 2025
1 parent 388194c commit b7f2236
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ runAgainstBucket config action = do
leakingPeriodVersionTMVar <- atomically newEmptyTMVar -- see note [Leaky bucket design].
tid <- myThreadId
bucket <- init config
withAsync (leak (readTMVar leakingPeriodVersionTMVar) tid bucket) $ \_ -> do
withAsync (do
labelThisThread "Leaky bucket (ouroboros-consensus)"
leak (readTMVar leakingPeriodVersionTMVar) tid bucket) $ \_ -> do
atomicallyWithMonotonicTime $ maybeStartThread Nothing leakingPeriodVersionTMVar bucket
result <-
action $
Expand Down

0 comments on commit b7f2236

Please sign in to comment.