Crate bevy_mod_async
source ·Modules§
Structs§
- Adds
AsyncWork
resource to world to handle async jobs spawned fromTaskContext::with_world
, and schedulesrun_async_jobs
inUpdate
to dispatch them. - This resource owns a queue for work that needs exclusive
World
access. Callingcreate_task_context
will give you aTaskContext
that can be used to schedule work onto the queue. - This is an adapter between async tasks and
AsyncWork
. This struct gets passed as a paramter into all new async tasks and can be used to send work to get run with exclusive world access. You can create one withAsyncWork::create_task_context
, or this will be done for you when you spawn a task withcommands.spawn_task()
.
Traits§
Functions§
- This system dispatches jobs that need exclusive
World
access (any tasks created withTaskContext::with_world
). This system can be moved around to control how often and when these tasks are dispatched.