Skip to content

Commit

Permalink
Merge 8f6978a into 450759d
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra authored Feb 21, 2023
2 parents 450759d + 8f6978a commit bdaf28b
Show file tree
Hide file tree
Showing 13 changed files with 854 additions and 381 deletions.
10 changes: 8 additions & 2 deletions crates/turbo-tasks-memory/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ use turbo_tasks::{
TaskId, TurboTasksBackendApi,
};

use crate::MemoryBackend;

#[derive(Default, Debug)]
pub(crate) enum Cell {
/// No content has been set yet, or it was removed for memory pressure
Expand Down Expand Up @@ -204,7 +206,11 @@ impl Cell {
}
}

pub fn assign(&mut self, content: CellContent, turbo_tasks: &dyn TurboTasksBackendApi) {
pub fn assign(
&mut self,
content: CellContent,
turbo_tasks: &dyn TurboTasksBackendApi<MemoryBackend>,
) {
match self {
Cell::Empty => {
*self = Cell::Value {
Expand Down Expand Up @@ -287,7 +293,7 @@ impl Cell {
}

/// Drops the cell after GC. Will notify all dependent tasks and events.
pub fn gc_drop(self, turbo_tasks: &dyn TurboTasksBackendApi) {
pub fn gc_drop(self, turbo_tasks: &dyn TurboTasksBackendApi<MemoryBackend>) {
match self {
Cell::Empty => {}
Cell::Recomputing {
Expand Down
2 changes: 1 addition & 1 deletion crates/turbo-tasks-memory/src/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl GcQueue {
&self,
factor: u8,
backend: &MemoryBackend,
turbo_tasks: &dyn TurboTasksBackendApi,
turbo_tasks: &dyn TurboTasksBackendApi<MemoryBackend>,
) -> Option<(GcPriority, usize, GcStats)> {
// Process through the inactive propagation queue.
while let Ok(task) = self.inactive_propagate_queue.pop() {
Expand Down
Loading

0 comments on commit bdaf28b

Please sign in to comment.