wasmtime: Option to disable parallel compilation (#3169)

* Introduce parallel-compilation configuration switch

* Plumb parallel_compilation config to compilation

* Adjust obj.rs

* Address review

* Fix compilation fail in `cache` crate

* Fix obj.rs

Also remove the now unneeded feature in /Cargo.toml

* fmt
This commit is contained in:
Sergei Shulepov
2021-08-10 21:09:15 +02:00
committed by GitHub
parent 42acb72c54
commit cbabcacb0f
8 changed files with 81 additions and 30 deletions

View File

@@ -43,6 +43,8 @@ impl<'config> ModuleCacheEntry<'config> {
}
/// Gets cached data if state matches, otherwise calls the `compute`.
// NOTE: This takes a function pointer instead of a closure so that it doesn't accidentally
// close over something not accounted in the cache.
pub fn get_data<T, U, E>(&self, state: T, compute: fn(T) -> Result<U, E>) -> Result<U, E>
where
T: Hash,