syscall/js: document more clearly how early js.Func can be released #38152
Labels
arch-wasm
WebAssembly issues
Documentation
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
OS-JS
Milestone
The documentation for
js.Func
currently says:Based on a comment from @neelance and my understanding of the code, it seems the intention is for it to be safe to release a
js.Func
at a time when no future invocations of thejs.Func
will be made. An invocation here means the time the execution begins. So, if ajs.Func
will only be invoked once, it is safe to release ajs.Func
right away in the Go function that will be executing:I believe the documentation needs to make this more clear, so that users can rely on this behavior.
/cc @neelance @hajimehoshi @johanbrandhorst
The text was updated successfully, but these errors were encountered: