We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
errorVariable
While digging into #41 I noticed that binderror uses a global to store the last error state:
binderror
https://github.com/codex-storage/questionable/blob/e56cf86c4a089c78a1b7c3005f13343bfbbe3b48/questionable/private/binderror.nim#L4C10-L4C10
It should probably be made into var errorVariable: ptr ref CatchableError.
var errorVariable: ptr ref CatchableError
If it's not a threadvar issues might arise when used with multiple threads. I haven't worked through the precise logic, but some sequence similar to:
without
Probably not all too likely and shouldn't cause a false error case, just report the wrong error. That'd still be annoying.
The text was updated successfully, but these errors were encountered:
Good find, thanks! I was able to reproduce this in a test and adding {.threadvar.} indeed fixes the problem: #46
{.threadvar.}
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
While digging into #41 I noticed that
binderror
uses a global to store the last error state:https://github.com/codex-storage/questionable/blob/e56cf86c4a089c78a1b7c3005f13343bfbbe3b48/questionable/private/binderror.nim#L4C10-L4C10
It should probably be made into
var errorVariable: ptr ref CatchableError
.If it's not a threadvar issues might arise when used with multiple threads. I haven't worked through the precise logic, but some sequence similar to:
without
clauseerrorVariable
to store an error ptrerrorVariable
errorVariable
and gets the error meant for thread2Probably not all too likely and shouldn't cause a false error case, just report the wrong error. That'd still be annoying.
The text was updated successfully, but these errors were encountered: