mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
remove tokio_util::block_on from ops/workers.rs (#3381)
This commit is contained in:
parent
6708fcc386
commit
1912ed6740
4 changed files with 49 additions and 40 deletions
|
@ -272,8 +272,8 @@ impl TsCompiler {
|
|||
|
||||
let worker = TsCompiler::setup_worker(global_state.clone());
|
||||
let worker_ = worker.clone();
|
||||
worker.post_message(req_msg).unwrap();
|
||||
let first_msg_fut = async move {
|
||||
worker.post_message(req_msg).await.unwrap();
|
||||
let result = worker.await;
|
||||
if let Err(err) = result {
|
||||
// TODO(ry) Need to forward the error instead of exiting.
|
||||
|
@ -382,8 +382,8 @@ impl TsCompiler {
|
|||
.add("Compile", &module_url.to_string());
|
||||
let global_state_ = global_state.clone();
|
||||
|
||||
worker.post_message(req_msg).unwrap();
|
||||
let first_msg_fut = async move {
|
||||
worker.post_message(req_msg).await.unwrap();
|
||||
let result = worker.await;
|
||||
if let Err(err) = result {
|
||||
// TODO(ry) Need to forward the error instead of exiting.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue