-
-
Couldn't load subscription status.
- Fork 5.7k
Remove try from at-time and close compile timer during throw #39133
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
Remove try from at-time and close compile timer during throw #39133
Conversation
|
|
|
I think you could use something like: macro try_finally(ex, fin)
Expr(:tryfinally,
:(local val = $(esc(ex))),
:($(esc(fin)))
)
endjulia> @try_finally x = 3 println("finalizing")
finalizing
3
julia> x
3
julia> @try_finally error() println("finalizing")
finalizing
ERROR:
Stacktrace:
[1] error() at ./error.jl:42
[2] top-level scope at REPL[4]:1but this probably works as well. |
|
That's neat.. @JeffBezanson what would be better? |
|
I'll merge this to get CI working properly again, and then we can discuss the exact implementation (using |
|
Great, thanks. I'll prepare a PR for the alternative idea |
* remove try from at-time and close compile timer during throw * add scope tests for at-time and aat-timev (cherry picked from commit 03957db)
* remove try from at-time and close compile timer during throw * add scope tests for at-time and aat-timev (cherry picked from commit 03957db)
* remove try from at-time and close compile timer during throw * add scope tests for at-time and aat-timev (cherry picked from commit 03957db)
…ng#39133) * remove try from at-time and close compile timer during throw * add scope tests for at-time and aat-timev
* remove try from at-time and close compile timer during throw * add scope tests for at-time and aat-timev (cherry picked from commit 03957db)
#38915 accidentally swallowed assignments due to the try-finally scope
this removes the try and disables the timer during every
throwAnd maintains the thread-locality introduced in #38915
cc. @vtjnash @ericphanson