next.js
4d4d8424 - refactor(turbo-tasks): Split local and global task state (#68963)

Commit
1 year ago
refactor(turbo-tasks): Split local and global task state (#68963) With tasks that use `local_cells`, they'll need to inherit some information from their parent non-local task (e.g. the `task_id`, cell counters, etc), but not everything is inherited (e.g. the function metadata). Splitting `CURRENT_TASK_STATE` into two separate task locals allows us to modify this inherit-some-but-not-all behavior. **Sidenote:** `CURRENT_LOCAL_TASK_STATE` is never mutated, so it doesn't need a `RefCell` or `RwLock` wrapper. ## Testing Should be identical in functionality. ``` cargo nextest r -p turbo-tasks-memory -p turbo-tasks --no-fail-fast ```
Author
bgw bgw
Parents
Loading