Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
6f84503e
Commit
6f84503e
authored
Dec 22, 2025
by
Tobias Koppers
Committed by
Tobias Koppers
Jan 13, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbopack: run tasks with priority
parent
2ba55e05
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
499 additions
and
82 deletions
+499
-82
mod.rs
...k/crates/turbo-tasks-backend/src/backend/operation/mod.rs
+4
-2
lib.rs
turbopack/crates/turbo-tasks/src/lib.rs
+4
-2
manager.rs
turbopack/crates/turbo-tasks/src/manager.rs
+108
-78
priority_runner.rs
turbopack/crates/turbo-tasks/src/priority_runner.rs
+383
-0
No files found.
turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs
View file @
6f84503e
...
@@ -16,7 +16,8 @@ use std::{
...
@@ -16,7 +16,8 @@ use std::{
use
bincode
::{
Decode
,
Encode
};
use
bincode
::{
Decode
,
Encode
};
use
turbo_tasks
::{
use
turbo_tasks
::{
CellId
,
FxIndexMap
,
KeyValuePair
,
TaskId
,
TurboTasksBackendApi
,
TypedSharedReference
,
CellId
,
FxIndexMap
,
KeyValuePair
,
TaskId
,
TaskPriority
,
TurboTasksBackendApi
,
TypedSharedReference
,
};
};
use
crate
::{
use
crate
::{
...
@@ -564,7 +565,8 @@ where
...
@@ -564,7 +565,8 @@ where
}
}
fn
schedule_task
(
&
self
,
task
:
Self
::
TaskGuardImpl
)
{
fn
schedule_task
(
&
self
,
task
:
Self
::
TaskGuardImpl
)
{
self
.turbo_tasks
.schedule
(
task
.id
());
let
priority
=
TaskPriority
::
root
();
self
.turbo_tasks
.schedule
(
task
.id
(),
priority
);
}
}
fn
operation_suspend_point
<
T
:
Clone
+
Into
<
AnyOperation
>>
(
&
mut
self
,
op
:
&
T
)
{
fn
operation_suspend_point
<
T
:
Clone
+
Into
<
AnyOperation
>>
(
&
mut
self
,
op
:
&
T
)
{
...
...
turbopack/crates/turbo-tasks/src/lib.rs
View file @
6f84503e
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#
!
[
feature
(
ptr_metadata
)]
#
!
[
feature
(
ptr_metadata
)]
#
!
[
feature
(
sync_unsafe_cell
)]
#
!
[
feature
(
sync_unsafe_cell
)]
#
!
[
feature
(
async_fn_traits
)]
#
!
[
feature
(
async_fn_traits
)]
#
!
[
feature
(
impl_trait_in_assoc_type
)]
pub
mod
backend
;
pub
mod
backend
;
mod
capture_future
;
mod
capture_future
;
...
@@ -68,6 +69,7 @@ mod output;
...
@@ -68,6 +69,7 @@ mod output;
pub
mod
panic_hooks
;
pub
mod
panic_hooks
;
pub
mod
parallel
;
pub
mod
parallel
;
pub
mod
primitives
;
pub
mod
primitives
;
mod
priority_runner
;
mod
raw_vc
;
mod
raw_vc
;
mod
read_options
;
mod
read_options
;
mod
read_ref
;
mod
read_ref
;
...
@@ -112,8 +114,8 @@ pub use crate::{
...
@@ -112,8 +114,8 @@ pub use crate::{
magic_any
::
MagicAny
,
magic_any
::
MagicAny
,
manager
::{
manager
::{
CurrentCellRef
,
ReadCellTracking
,
ReadConsistency
,
ReadTracking
,
TaskPersistence
,
CurrentCellRef
,
ReadCellTracking
,
ReadConsistency
,
ReadTracking
,
TaskPersistence
,
T
urboTasks
,
TurboTasksApi
,
TurboTasksBackendApi
,
TurboTasksCallApi
,
Unused
,
UpdateInfo
,
T
askPriority
,
TurboTasks
,
TurboTasksApi
,
TurboTasksBackendApi
,
TurboTasksCallApi
,
Unused
,
dynamic_call
,
emit
,
get_serialization_invalidator
,
mark_finished
,
mark_root
,
UpdateInfo
,
dynamic_call
,
emit
,
get_serialization_invalidator
,
mark_finished
,
mark_root
,
mark_session_dependent
,
prevent_gc
,
run
,
run_once
,
run_once_with_reason
,
trait_call
,
mark_session_dependent
,
prevent_gc
,
run
,
run_once
,
run_once_with_reason
,
trait_call
,
turbo_tasks
,
turbo_tasks_scope
,
turbo_tasks_weak
,
with_turbo_tasks
,
turbo_tasks
,
turbo_tasks_scope
,
turbo_tasks_weak
,
with_turbo_tasks
,
},
},
...
...
turbopack/crates/turbo-tasks/src/manager.rs
View file @
6f84503e
This diff is collapsed.
Click to expand it.
turbopack/crates/turbo-tasks/src/priority_runner.rs
0 → 100644
View file @
6f84503e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment