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
e5e39c60
Commit
e5e39c60
authored
Oct 02, 2025
by
Tobias Koppers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure tests are dropping turbo tasks correctly
parent
a8c849a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
run.rs
turbopack/crates/turbo-tasks-testing/src/run.rs
+8
-0
No files found.
turbopack/crates/turbo-tasks-testing/src/run.rs
View file @
e5e39c60
...
@@ -114,6 +114,10 @@ where
...
@@ -114,6 +114,10 @@ where
let
start
=
std
::
time
::
Instant
::
now
();
let
start
=
std
::
time
::
Instant
::
now
();
tt
.stop_and_wait
()
.await
;
tt
.stop_and_wait
()
.await
;
println!
(
"Stopping TurboTasks took {:?}"
,
start
.elapsed
());
println!
(
"Stopping TurboTasks took {:?}"
,
start
.elapsed
());
assert
!
(
Arc
::
strong_count
(
&
tt
)
==
1
);
let
start
=
std
::
time
::
Instant
::
now
();
drop
(
tt
);
println!
(
"Dropping TurboTasks took {:?}"
,
start
.elapsed
());
for
i
in
10
..
20
{
for
i
in
10
..
20
{
let
tt
=
registration
.create_turbo_tasks
(
&
name
,
false
);
let
tt
=
registration
.create_turbo_tasks
(
&
name
,
false
);
println!
(
"Run #{i} (with persistent cache if available, new TurboTasks instance)"
);
println!
(
"Run #{i} (with persistent cache if available, new TurboTasks instance)"
);
...
@@ -123,6 +127,10 @@ where
...
@@ -123,6 +127,10 @@ where
let
start
=
std
::
time
::
Instant
::
now
();
let
start
=
std
::
time
::
Instant
::
now
();
tt
.stop_and_wait
()
.await
;
tt
.stop_and_wait
()
.await
;
println!
(
"Stopping TurboTasks took {:?}"
,
start
.elapsed
());
println!
(
"Stopping TurboTasks took {:?}"
,
start
.elapsed
());
assert
!
(
Arc
::
strong_count
(
&
tt
)
==
1
);
let
start
=
std
::
time
::
Instant
::
now
();
drop
(
tt
);
println!
(
"Dropping TurboTasks took {:?}"
,
start
.elapsed
());
assert_eq!
(
first
,
third
);
assert_eq!
(
first
,
third
);
}
}
Ok
(())
Ok
(())
...
...
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