threads: run ExampleCoreFeaturesThreads on both compiler/interpreter (#2135)
This commit is contained in:
@@ -34,9 +34,7 @@ func ExampleCoreFeaturesThreads() {
|
||||
ctx := context.Background()
|
||||
|
||||
// Threads support must be enabled explicitly in addition to standard V2 features.
|
||||
|
||||
// TODO: currently, only the interpreter is supported for snapshotting.
|
||||
cfg := wazero.NewRuntimeConfigInterpreter().WithCoreFeatures(api.CoreFeaturesV2 | experimental.CoreFeaturesThreads)
|
||||
cfg := wazero.NewRuntimeConfig().WithCoreFeatures(api.CoreFeaturesV2 | experimental.CoreFeaturesThreads)
|
||||
|
||||
r := wazero.NewRuntimeWithConfig(ctx, cfg)
|
||||
defer r.Close(ctx)
|
||||
|
||||
@@ -472,13 +472,6 @@ func (e *engine) compileHostModule(ctx context.Context, module *wasm.Module, lis
|
||||
func (e *engine) Close() (err error) {
|
||||
e.mux.Lock()
|
||||
defer e.mux.Unlock()
|
||||
|
||||
for _, cm := range e.compiledModules {
|
||||
cm.functionOffsets = nil
|
||||
cm.module = nil
|
||||
cm.parent = nil
|
||||
cm.executables = nil
|
||||
}
|
||||
e.sortedCompiledModules = nil
|
||||
e.compiledModules = nil
|
||||
e.sharedFunctions = nil
|
||||
|
||||
Reference in New Issue
Block a user