Skip to content

Commit 77bbf31

Browse files
committed
Update tokio_tests.rs
1 parent 005edae commit 77bbf31

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/tokio_tests.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fn test_tokio_join() {
99
let (tx1, mut rx1) = tokio::sync::mpsc::channel::<usize>(1);
1010
let (tx2, mut rx2) = tokio::sync::mpsc::channel::<usize>(1);
1111
executor
12-
.spawn("ThreadedFuture", async move {
12+
.spawn_local("ThreadedFuture", async move {
1313
let (a, b) = tokio::join!(rx1.recv(), rx2.recv());
1414
assert_eq!(a.unwrap(), 10);
1515
assert_eq!(b.unwrap(), 20);
@@ -19,7 +19,7 @@ fn test_tokio_join() {
1919
let (tx3, mut rx3) = tokio::sync::mpsc::channel::<usize>(1);
2020
let (tx4, mut rx4) = tokio::sync::mpsc::channel::<usize>(1);
2121
executor
22-
.spawn("LocalFuture", async move {
22+
.spawn_local("LocalFuture", async move {
2323
let (a, b) = tokio::join!(rx3.recv(), rx4.recv());
2424
assert_eq!(a.unwrap(), 10);
2525
assert_eq!(b.unwrap(), 20);
@@ -46,7 +46,7 @@ fn test_tokio_select() {
4646
let (tx1, mut rx1) = tokio::sync::mpsc::channel::<usize>(1);
4747
let (_tx2, mut rx2) = tokio::sync::mpsc::channel::<usize>(1);
4848
executor
49-
.spawn("ThreadedFuture", async move {
49+
.spawn_local("ThreadedFuture", async move {
5050
tokio::select! {
5151
data = rx1.recv() => {
5252
assert_eq!(data.unwrap(), 10);
@@ -59,7 +59,7 @@ fn test_tokio_select() {
5959
let (tx3, mut rx3) = tokio::sync::mpsc::channel::<usize>(1);
6060
let (_tx4, mut rx4) = tokio::sync::mpsc::channel::<usize>(1);
6161
executor
62-
.spawn("LocalFuture", async move {
62+
.spawn_local("LocalFuture", async move {
6363
tokio::select! {
6464
data = rx3.recv() => {
6565
assert_eq!(data.unwrap(), 10);

0 commit comments

Comments
 (0)