Skip to content

Commit

Permalink
fix hanging of stale tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Sep 4, 2024
1 parent 492e0cb commit 83bedf6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions turbopack/crates/turbo-tasks-backend/src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,11 +744,7 @@ impl Backend for TurboTasksBackend {

if stale {
task.add_new(CachedDataItem::InProgress {
value: InProgressState::InProgress {
stale: false,
once_task,
done_event,
},
value: InProgressState::Scheduled { done_event },
});
drop(task);
drop(ctx);
Expand Down Expand Up @@ -818,9 +814,10 @@ impl Backend for TurboTasksBackend {

task.remove(&CachedDataItemKey::Dirty {});

done_event.notify(usize::MAX);
drop(task);

done_event.notify(usize::MAX);

CleanupOldEdgesOperation::run(task_id, old_edges, ctx);

drop(removed_data)
Expand Down

0 comments on commit 83bedf6

Please sign in to comment.