You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use bevy::{prelude::*, tasks::ComputeTaskPool};fnmain(){App::new().add_plugins(MinimalPlugins).add_startup_system(startup).run();}fnstartup(){ComputeTaskPool::get().spawn_local(async{println!("hi")}).detach();}
What went wrong
hi is not printed :(
The text was updated successfully, but these errors were encountered:
# Objective
- bevyengine#4466 broke local tasks running.
- Fixesbevyengine#6120
## Solution
- Add system for ticking local executors on main thread into bevy_core where the tasks pools are initialized.
- Add ticking local executors into thread executors
## Changelog
- tick all thread local executors in task pool.
## Notes
- ~~Not 100% sure about this PR. Ticking the local executor for the main thread in scope feels a little kludgy as it requires users of bevy_tasks to be calling scope periodically for those tasks to make progress.~~ took this out in favor of a system that ticks the local executors.
# Objective
- bevyengine#4466 broke local tasks running.
- Fixesbevyengine#6120
## Solution
- Add system for ticking local executors on main thread into bevy_core where the tasks pools are initialized.
- Add ticking local executors into thread executors
## Changelog
- tick all thread local executors in task pool.
## Notes
- ~~Not 100% sure about this PR. Ticking the local executor for the main thread in scope feels a little kludgy as it requires users of bevy_tasks to be calling scope periodically for those tasks to make progress.~~ took this out in favor of a system that ticks the local executors.
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this issue
Feb 1, 2023
# Objective
- bevyengine#4466 broke local tasks running.
- Fixesbevyengine#6120
## Solution
- Add system for ticking local executors on main thread into bevy_core where the tasks pools are initialized.
- Add ticking local executors into thread executors
## Changelog
- tick all thread local executors in task pool.
## Notes
- ~~Not 100% sure about this PR. Ticking the local executor for the main thread in scope feels a little kludgy as it requires users of bevy_tasks to be calling scope periodically for those tasks to make progress.~~ took this out in favor of a system that ticks the local executors.
Detached task on local thread is not run after:
#4466
Bevy version
First commit to be affected:
d22d310
Relevant system information
What you did
What went wrong
hi
is not printed :(The text was updated successfully, but these errors were encountered: