Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asyncloop isCounterLeaked returns incorrect value? #431

Closed
doongjohn opened this issue Aug 3, 2023 · 0 comments
Closed

asyncloop isCounterLeaked returns incorrect value? #431

doongjohn opened this issue Aug 3, 2023 · 0 comments

Comments

@doongjohn
Copy link

proc isCounterLeaked*(name: string): bool {.noinit.} =
## Returns ``true`` if leak is detected, number of `opened` not equal to
## number of `closed` requests.
let tracker = TrackerCounter(opened: 0'u64, closed: 0'u64)
let res = getThreadDispatcher().counters.getOrDefault(name, tracker)
res.opened == res.closed

it says Returns true if leak is detected, number of opened not equal to number of closed requests.
However it returns true if number of opened is equal to number of closed requests.

cheatfate added a commit that referenced this issue Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant