mirror of
https://github.com/logos-storage/nim-chronos.git
synced 2026-01-03 22:13:06 +00:00
add zombie checks to run state too
This commit is contained in:
parent
9f9b31450e
commit
9883d7dd8a
@ -89,7 +89,7 @@ proc isZombie(self: var ProfilerMetrics, event: Event): bool =
|
||||
true
|
||||
|
||||
proc futureRunning(self: var ProfilerMetrics, event: Event): void =
|
||||
assert self.partials.hasKey(event.futureId)
|
||||
if self.isZombie(event): return
|
||||
|
||||
self.partials.withValue(event.futureId, metrics):
|
||||
assert metrics.state == Pending or metrics.state == Paused,
|
||||
@ -102,7 +102,6 @@ proc futureRunning(self: var ProfilerMetrics, event: Event): void =
|
||||
metrics.state = Running
|
||||
|
||||
proc futurePaused(self: var ProfilerMetrics, event: Event): void =
|
||||
# Pause events can come from zombie futures, so we need to check for that.
|
||||
if self.isZombie(event): return
|
||||
|
||||
assert event.futureId == self.callStack.pop(), $event.location
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user