We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a02a367 commit a5e0b2fCopy full SHA for a5e0b2f
crates/core/src/wasm_runtime/contract.rs
@@ -308,15 +308,18 @@ fn handle_execution_call(
308
r: JoinHandle<(Result<i64, wasmer::RuntimeError>, Store)>,
309
rt: &mut super::Runtime,
310
) -> Result<i64, Errors> {
311
- for _ in 0..5 {
+ // Simple implementation: check every 10ms for up to 5 seconds
312
+ for _ in 0..500 {
313
if r.is_finished() {
314
break;
315
}
- thread::sleep(Duration::from_secs(1));
316
+ thread::sleep(Duration::from_millis(10));
317
318
+
319
if !r.is_finished() {
320
return Err(Errors::MaxComputeTimeExceeded);
321
322
323
let (r, s) = r
324
.join()
325
.map_err(|_| Errors::Other(anyhow::anyhow!("Failed to join thread")))?;
0 commit comments