-
Notifications
You must be signed in to change notification settings - Fork 14
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
Asynchronous tasks can accidentally call patched functions #89
Comments
We might want to push the variable that says if we are mocking or not into a dynamically scoped context from |
I've confirmed that ContextVariablesX.jl does fix the issue as demonstrated above. I'll work on a PR for this. @oxinabox I appreciate you bringing that package to my attention ❤️ |
Unfortunately using ContextVariablesX.jl doesn't play nice with |
@tkf any ideas? |
omus already figured it out. But, linking the discussion for the record: tkf/ContextVariablesX.jl#16 (comment) |
Issue was fixed in #112 but requires Julia 1.11 |
In a scenario where an background asynchronous task is calling a function using
@mock
and a patch is applied during that time the async task can call the patched function instead of the original:The text was updated successfully, but these errors were encountered: