Skip to content

Commit

Permalink
track task id of all_clean_event
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Oct 8, 2024
1 parent 82db7eb commit c8c1da9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions turbopack/crates/turbo-tasks-backend/src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ impl TurboTasksBackendInner {
// active and this task won't stale. CachedActiveUntilClean
// is automatically removed when this task is clean.
task.add_new(CachedDataItem::AggregateRoot {
value: RootState::new(ActiveType::CachedActiveUntilClean),
value: RootState::new(ActiveType::CachedActiveUntilClean, task_id),
});
get!(task, AggregateRoot).unwrap()
};
Expand Down Expand Up @@ -1442,7 +1442,7 @@ impl TurboTasksBackendInner {
},
});
task.add(CachedDataItem::AggregateRoot {
value: RootState::new(root_type),
value: RootState::new(root_type, task_id),
});
task.add(CachedDataItem::new_scheduled(move || match root_type {
ActiveType::RootTask => "Root Task".to_string(),
Expand Down
4 changes: 2 additions & 2 deletions turbopack/crates/turbo-tasks-backend/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ pub struct RootState {
}

impl RootState {
pub fn new(ty: ActiveType) -> Self {
pub fn new(ty: ActiveType, id: TaskId) -> Self {
Self {
ty,
all_clean_event: Event::new(|| "RootState::all_clean_event".to_string()),
all_clean_event: Event::new(move || format!("RootState::all_clean_event {:?}", id)),
}
}
}
Expand Down

0 comments on commit c8c1da9

Please sign in to comment.