Skip to content

Commit

Permalink
Clean up some of the syntax in the manager's schedule method
Browse files Browse the repository at this point in the history
  • Loading branch information
bgw committed Aug 5, 2024
1 parent a4ca56e commit 71382c4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions turbopack/crates/turbo-tasks/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,12 @@ impl<B: Backend + 'static> TurboTasks<B> {

let this = self.pin();
let future = async move {
#[allow(clippy::blocks_in_conditions)]
while CURRENT_TASK_STATE
.scope(
RefCell::new(CurrentTaskState::new(this.execution_id_factory.get())),
async {
let mut schedule_again = true;
while schedule_again {
let task_state =
RefCell::new(CurrentTaskState::new(this.execution_id_factory.get()));
schedule_again = CURRENT_TASK_STATE
.scope(task_state, async {
if this.stopped.load(Ordering::Acquire) {
return false;
}
Expand Down Expand Up @@ -560,10 +561,9 @@ impl<B: Backend + 'static> TurboTasks<B> {
.await
})
.await
},
)
.await
{}
})
.await;
}
this.finish_primary_job();
anyhow::Ok(())
};
Expand Down

0 comments on commit 71382c4

Please sign in to comment.