ResourceContexts.jl icon indicating copy to clipboard operation
ResourceContexts.jl copied to clipboard

Safe resource handling for Julia, without the do blocks

Results 7 ResourceContexts.jl issues
Sort by recently updated
recently updated
newest added

Is this considered maintained?

Interrupting an `enter_do` call **in VS code** while it is running the pre-`user_func` portion of `foo` leads to an exception, but the code continues running. The following should work as...

For example: ``` > @! function g() end g (generic function with 1 method) > g( g(var"#context"::ResourceContexts.AbstractContext) in Main at REPL[10]:1 ``` but ``` > @! function h()::Int end h...

bug

@tkf we discussed just a little about the differences between ResourceContexts vs ContextManagers in https://github.com/c42f/ResourceContexts.jl/pull/8 If you're interested I'd like to discuss the design pros and cons a bit and...

Since https://github.com/c42f/ResourceContexts.jl/blob/732a8cadbeb76e2dd5dfaed2ca244fe099d2f326/src/ResourceContexts.jl#L11-L12 is not protected by a lock, I'm guessing that the following pattern is not data-race-free? ```julia function f() @context begin @sync begin @spawn readlines(@!(open("1.txt", "r"))) @spawn readlines(@!(open("2.txt", "r")))...

It seems that context passing and cleanup has a similar structure to reverse mode AD: we accumulate a bunch of actions wrapped inside closures which must be run at the...