MCPcopy Create free account

hub / github.com/EkardNT/bevy-tokio-tasks / functions

Functions22 in github.com/EkardNT/bevy-tokio-tasks

↓ 5 callersMethodrun_on_main_thread
Invokes a synchronous callback on the main Bevy thread. The callback will have mutable access to the main Bevy [`World`], allowing it to update any re
src/lib.rs:228
↓ 5 callersMethodspawn_background_task
Spawn a task which will run on the background Tokio [`Runtime`] managed by this [`TokioTasksRuntime`]. The background task is provided a [`TaskContext
src/lib.rs:146
↓ 2 callersMethodbuild
(&self, app: &mut App)
src/lib.rs:68
↓ 2 callersMethodsleep_updates
Sleeps the background task until a given number of main thread updates have occurred. If you instead want to sleep for a given length of wall-clock ti
src/lib.rs:212
↓ 1 callersMethodexecute_main_thread_work
Execute all of the requested runnables on the main thread.
src/lib.rs:166
↓ 1 callersMethodincrement_ticks
(&self)
src/lib.rs:22
Methodcurrent_tick
Returns the current value of the ticket count from the main thread - how many updates have occurred since the start of the program. Because the tick c
src/lib.rs:205
Methoddefault
Configures the plugin to build a new Tokio [`Runtime`] with both IO and timer functionality enabled. On the wasm32 architecture, the [`Runtime`] will
src/lib.rs:50
Functiondemo
(runtime: ResMut<TokioTasksRuntime>, mut commands: Commands)
examples/change_clear_color.rs:25
Functiondemo
(runtime: ResMut<TokioTasksRuntime>, mut commands: Commands)
examples/async_fn.rs:25
Functiondemo
(runtime: ResMut<TokioTasksRuntime>)
examples/custom_schedule_label.rs:19
Functiondemo
(runtime: ResMut<TokioTasksRuntime>)
examples/shutdown_after_sleep.rs:15
Functiondemo
(runtime: ResMut<TokioTasksRuntime>, mut commands: Commands)
examples/current_thread_runtime.rs:32
Functionmain
()
examples/change_clear_color.rs:17
Functionmain
()
examples/async_fn.rs:17
Functionmain
()
examples/custom_schedule_label.rs:8
Functionmain
()
examples/shutdown_after_sleep.rs:7
Functionmain
()
examples/current_thread_runtime.rs:17
Methodnew
( ticks: Arc<AtomicUsize>, runtime: Runtime, update_watch_rx: tokio::sync::watch::Rece
src/lib.rs:120
Methodruntime
Returns the Tokio [`Runtime`] on which background tasks are executed. You can specify how this is created by providing a custom [`make_runtime`](Tokio
src/lib.rs:138
Functiontick_runtime_update
The Bevy exclusive system which executes the main thread callbacks that background tasks requested using [`run_on_main_thread`](TaskContext::run_on_ma
src/lib.rs:85
Functionupdate_colors
(mut ctx: TaskContext)
examples/async_fn.rs:30