You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
The CompiledModule should still be able to be instantiated as the caller isn't aware that the module is shared between multiple instances.
Screenshots
N/A
Environment (please complete the relevant information):
Additional context
The current behaviour makes it difficult to bound the number of active modules. The caller needs to manage access to the CompiledModule and must infer the cache key (ModuleID could be provided by CompiledModule interface?). To Close a compiled module shared between multiple viewers we must wait for all viewers to go away and then syncronize the call of Close to happen before anymore calls to CompileModule to avoid a race.
Describe the bug
Closing a
CompiledModule
will affect anotherCompiledModule
if they are compiled to the same runtime using the same wasm bytes.To Reproduce
This causes the following error on the second log line:
main...emcfarlane:wazero:ed/dupCompCache
Expected behavior
The
CompiledModule
should still be able to be instantiated as the caller isn't aware that the module is shared between multiple instances.Screenshots
N/A
Environment (please complete the relevant information):
Additional context
The current behaviour makes it difficult to bound the number of active modules. The caller needs to manage access to the
CompiledModule
and must infer the cache key (ModuleID could be provided byCompiledModule
interface?). ToClose
a compiled module shared between multiple viewers we must wait for all viewers to go away and then syncronize the call ofClose
to happen before anymore calls toCompileModule
to avoid a race.Related issues #1913
The text was updated successfully, but these errors were encountered: