Skip to content

Commit

Permalink
Attempt thread::sleep fix
Browse files Browse the repository at this point in the history
  • Loading branch information
outkine committed Mar 26, 2024
1 parent 624600e commit 8dec304
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ impl Lang {
($bytes:expr) => {{
static MODULE: OnceCell<(wasmer::Module, WasiVersion)> = OnceCell::new();
let (module, version) = MODULE.get_or_try_init(|| {
std::thread::sleep(std::time::Duration::from_millis(100));
let module = unsafe { wasmer::Module::deserialize(store, $bytes)? };
let version = wasmer_wasi::get_wasi_version(&module, false)
.unwrap_or(WasiVersion::Latest);
Expand Down

0 comments on commit 8dec304

Please sign in to comment.