Remove try from at-time and close compile timer during throw#39133
Merged
KristofferC merged 3 commits intoJuliaLang:masterfrom Jan 7, 2021
Merged
Remove try from at-time and close compile timer during throw#39133KristofferC merged 3 commits intoJuliaLang:masterfrom
KristofferC merged 3 commits intoJuliaLang:masterfrom
Conversation
JeffBezanson
reviewed
Jan 7, 2021
Member
Author
|
|
Member
|
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. |
Member
Author
|
That's neat.. @JeffBezanson what would be better? |
Member
|
I'll merge this to get CI working properly again, and then we can discuss the exact implementation (using |
Member
Author
|
Great, thanks. I'll prepare a PR for the alternative idea |
KristofferC
pushed a commit
that referenced
this pull request
Jan 7, 2021
* 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)
vtjnash
referenced
this pull request
Jan 7, 2021
KristofferC
pushed a commit
that referenced
this pull request
Jan 8, 2021
* 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)
staticfloat
pushed a commit
that referenced
this pull request
Jan 15, 2021
* 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)
ElOceanografo
pushed a commit
to ElOceanografo/julia
that referenced
this pull request
May 4, 2021
…ng#39133) * remove try from at-time and close compile timer during throw * add scope tests for at-time and aat-timev
This was referenced Aug 18, 2021
staticfloat
pushed a commit
that referenced
this pull request
Dec 23, 2022
* 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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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