Fixes race on engine creation with Cache API (#1021)
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
@@ -125,13 +125,15 @@ func NewRuntimeConfig() RuntimeConfig {
|
||||
return newRuntimeConfig()
|
||||
}
|
||||
|
||||
type newEngine func(context.Context, api.CoreFeatures, filecache.Cache) wasm.Engine
|
||||
|
||||
type runtimeConfig struct {
|
||||
enabledFeatures api.CoreFeatures
|
||||
memoryLimitPages uint32
|
||||
memoryCapacityFromMax bool
|
||||
isInterpreter bool
|
||||
dwarfDisabled bool // negative as defaults to enabled
|
||||
newEngine func(context.Context, api.CoreFeatures, filecache.Cache) wasm.Engine
|
||||
newEngine newEngine
|
||||
cache CompilationCache
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user