Skip to content

Commit b97a541

Browse files
committed
chore: fix cargo fmt
1 parent 4f25a16 commit b97a541

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

turbopack/crates/turbopack-node/js/src/worker_threads/evaluate.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ export const run = async (
121121
}
122122

123123
while (true) {
124-
// need await a micro task, or that if some some request rejected,
125-
// the error will be propergated to schedule threat, then causing panic
126-
await Promise.resolve()
127124
const msg_str = await binding.recvMessageInWorker(workerId)
128125

129126
const msg = JSON.parse(msg_str) as
@@ -153,6 +150,9 @@ export const run = async (
153150
requests.delete(msg.id)
154151
if (msg.error) {
155152
request.reject(new Error(msg.error))
153+
// need await a micro task, or else if some request rejected,
154+
// the error will be propergated to schedule thread, then causing panic
155+
await Promise.resolve()
156156
} else {
157157
request.resolve(msg.data)
158158
}

turbopack/crates/turbopack-node/src/evaluate.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ use turbo_tasks::{
1313
TryJoinIterExt, Vc, duration_span, fxindexmap, get_effects, trace::TraceRawVcs,
1414
};
1515
use turbo_tasks_env::{EnvMap, ProcessEnv};
16-
use turbo_tasks_fs::{File, FileContent, FileSystemPath, json::parse_json_with_source_context, to_sys_path};
16+
use turbo_tasks_fs::{
17+
File, FileContent, FileSystemPath, json::parse_json_with_source_context, to_sys_path,
18+
};
1719
use turbopack_core::{
1820
asset::AssetContent,
1921
changed::content_changed,

0 commit comments

Comments
 (0)