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
This implementation of with_scratch_directory
with_scratch_directory
Scratch.jl/src/Scratch.jl
Lines 16 to 23 in 5677106
is
@async
The last point is about
julia> with_scratch_directory("a") do @show Scratch.SCRATCH_DIR_OVERRIDE[] with_scratch_directory("b") do @show Scratch.SCRATCH_DIR_OVERRIDE[] end @show Scratch.SCRATCH_DIR_OVERRIDE[] end Scratch.SCRATCH_DIR_OVERRIDE[] = "a" Scratch.SCRATCH_DIR_OVERRIDE[] = "b" Scratch.SCRATCH_DIR_OVERRIDE[] = nothing
where the last line should be Scratch.SCRATCH_DIR_OVERRIDE[] = "a".
Scratch.SCRATCH_DIR_OVERRIDE[] = "a"
I think with_scratch_directory is a perfect example where using a context variable JuliaLang/julia#35833 is useful.
If you are curious, here is a branch of Scratch.jl that uses ContextVariablesX.jl; a proof-of-concept/backport of ContextVariables I proposed in the PR JuliaLang/julia#35833. We just need to change a few lines: v1.0.1...tkf:contextvariablesx
ContextVariables
The text was updated successfully, but these errors were encountered:
Well we can't fix the concurrency issues without doing some kind of TLS, but we can fix 3 rather easily by saving the old value then restoring it.
Sorry, something went wrong.
No branches or pull requests
This implementation of
with_scratch_directory
Scratch.jl/src/Scratch.jl
Lines 16 to 23 in 5677106
is
@async
can cause bugs),The last point is about
where the last line should be
Scratch.SCRATCH_DIR_OVERRIDE[] = "a"
.I think
with_scratch_directory
is a perfect example where using a context variable JuliaLang/julia#35833 is useful.If you are curious, here is a branch of Scratch.jl that uses ContextVariablesX.jl; a proof-of-concept/backport of
ContextVariables
I proposed in the PR JuliaLang/julia#35833. We just need to change a few lines:v1.0.1...tkf:contextvariablesx
The text was updated successfully, but these errors were encountered: