summaryrefslogtreecommitdiff
path: root/core/examples
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-10-10 05:41:11 -0400
committerGitHub <noreply@github.com>2020-10-10 11:41:11 +0200
commit08bb8b3d53eb2445de9b5e2845ab8acf9d353800 (patch)
treeebf00cb815ee1a10be00c74cbb332af33dd52dc2 /core/examples
parent782e6a2ed5d76bb5a154c56d7daf4607e5bdb93f (diff)
Fix 100% CPU idling problem by reverting #7672 (#7911)
* Revert "refactor: Worker is not a Future (#7895)" This reverts commit f4357f0ff9d39411f22504fcc20db6bd5dec6ddb. * Revert "refactor(core): JsRuntime is not a Future (#7855)" This reverts commit d8879feb8c832dbb38649551b1cb0730874f7be6. * Revert "fix(core): module execution with top level await (#7672)" This reverts commit c7c767782538243ded64742dca9b34d6af74d62d.
Diffstat (limited to 'core/examples')
-rw-r--r--core/examples/http_bench_bin_ops.rs2
-rw-r--r--core/examples/http_bench_json_ops.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/examples/http_bench_bin_ops.rs b/core/examples/http_bench_bin_ops.rs
index 7335b8670..8d612f146 100644
--- a/core/examples/http_bench_bin_ops.rs
+++ b/core/examples/http_bench_bin_ops.rs
@@ -260,7 +260,7 @@ fn main() {
include_str!("http_bench_bin_ops.js"),
)
.unwrap();
- js_runtime.run_event_loop().await
+ js_runtime.await
};
runtime.block_on(future).unwrap();
}
diff --git a/core/examples/http_bench_json_ops.rs b/core/examples/http_bench_json_ops.rs
index 2cf3d09e3..106b96f36 100644
--- a/core/examples/http_bench_json_ops.rs
+++ b/core/examples/http_bench_json_ops.rs
@@ -193,7 +193,7 @@ fn main() {
include_str!("http_bench_json_ops.js"),
)
.unwrap();
- js_runtime.run_event_loop().await
+ js_runtime.await
};
runtime.block_on(future).unwrap();
}