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
To allows creating a module for multiple threads, it's dependancy to the AsStoreRef (that will not be shared accross threads) needs to be remove. An Engine should be enough to build a Module.
Proposed solution
Create AsEngineRef for Engine, similar to AsStoreRef for the Store, and make the Module buildable from this instead of AsStoreRef
To avoid API breaking chnage, a Store should also implement AsEngineRef.
3378: Introduced EngineRef and AsEngineRef trait r=ptitSeb a=ptitSeb
# Description
Introduced `EngineRef` structure that is used to build a Module (instead of `StoreRef`) and the `AsEngineRef` trait.
`Store` implement this trait, so there will be no change in writen code even if it's an API change.
This allow to create a Module independantly of a Store, as it can be usefull for multi-thread scenario.
For #3372
Co-authored-by: ptitSeb <sebastien.chev@gmail.com>
Motivation
To allows creating a module for multiple threads, it's dependancy to the AsStoreRef (that will not be shared accross threads) needs to be remove. An Engine should be enough to build a Module.
Proposed solution
Create
AsEngineRef
forEngine
, similar toAsStoreRef
for theStore
, and make the Module buildable from this instead ofAsStoreRef
To avoid API breaking chnage, a
Store
should also implementAsEngineRef
.Additional context
This should allow better scenario of multi-thread usage, as described there: https://github.com/dsherret/slow-wasm-example/tree/slow_drop
The text was updated successfully, but these errors were encountered: