Skip to content

Commit b6418db

Browse files
committed
Document aliasing
1 parent 6a37027 commit b6418db

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/copyable_task.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ function build_callable(sig::Type{<:Tuple})
8787
end
8888
end
8989

90+
# Note: `position` must be a const field of this mutable struct, rather than
91+
# simply being a mutable field because it must alias a `Ref` in the captures
92+
# field of `mc`. This correspondence is ensured upon construction.
9093
mutable struct TapedTask{Ttaped_globals,Tfargs,Tmc<:MistyClosure}
9194
taped_globals::Ttaped_globals
9295
const fargs::Tfargs

0 commit comments

Comments
 (0)