Skip to content

Commit

Permalink
no invalidation on Drop
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Sep 4, 2024
1 parent ff450c7 commit 410051f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
13 changes: 0 additions & 13 deletions turbopack/crates/turbo-tasks-fs/src/invalidator_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,3 @@ impl<'de> Deserialize<'de> for InvalidatorMap {
deserializer.deserialize_newtype_struct("InvalidatorMap", V)
}
}

impl Drop for InvalidatorMap {
fn drop(&mut self) {
while let Ok((_, value)) = self.queue.pop() {
value.invalidate();
}
for (_, invalidators) in self.map.lock().unwrap().drain() {
for invalidator in invalidators {
invalidator.invalidate();
}
}
}
}
9 changes: 0 additions & 9 deletions turbopack/crates/turbo-tasks/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,6 @@ impl<'de, T> Deserialize<'de> for State<T> {
}
}

impl<T> Drop for State<T> {
fn drop(&mut self) {
let mut inner = self.inner.lock();
for invalidator in take(&mut inner.invalidators) {
invalidator.invalidate();
}
}
}

impl<T> State<T> {
pub fn new(value: T) -> Self {
mark_stateful();
Expand Down

0 comments on commit 410051f

Please sign in to comment.