-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Detached non-Send tasks don't run #6120
Copy link
Copy link
Closed
Labels
A-TasksTools for parallel and async workTools for parallel and async workC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
Milestone
Description
Detached task on local thread is not run after:
#4466
Bevy version
First commit to be affected:
d22d310
Relevant system information
- cargo 1.64.0 (387270bc7 2022-09-16)
- Windows 11
What you did
use bevy::{prelude::*, tasks::ComputeTaskPool};
fn main() {
App::new()
.add_plugins(MinimalPlugins)
.add_startup_system(startup)
.run();
}
fn startup() {
ComputeTaskPool::get()
.spawn_local(async { println!("hi") })
.detach();
}What went wrong
hi is not printed :(
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-TasksTools for parallel and async workTools for parallel and async workC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior