Skip to content

Commit 4cba2f6

Browse files
committed
options: Merge new and old options
1 parent 4133b9a commit 4cba2f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/options.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ scope. Note that setting an option here will propagate its value across Julia
1313
or Dagger tasks spawned by `f()` or its callees (i.e. the options propagate).
1414
"""
1515
function with_options(f, options::NamedTuple)
16-
with(options_context => options) do
16+
prev_options = options_context[]
17+
with(options_context => merge(prev_options, options)) do
1718
f()
1819
end
1920
end

0 commit comments

Comments
 (0)