-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.Runtime.InteropServices.JavaScript
Milestone
Description
release all those proxies when we detach the worker.
- for the proxies of objects, we would reset the GCHandle/JSHandle to -1 and if some stray setTimeout callback uses it, we will throw.
- for the proxies of functions, mark it disposed and it would throw if you try to call it.
- for the proxies of Task/Promise
- same for proxies in the other direction.
- at the end of detach, we should assert that have empty FinalizationRegistry of that worker.
- at the end of detach, we should assert that s_csOwnedObjects is empty
- we need a JS callback or event when a pthread detaches
- the FinalizationRegistry callback invokes managed code, so we need to check when is the last moment when the thread is still attached enough that we can run some managed code.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.Runtime.InteropServices.JavaScript