Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EkardNT/bevy-tokio-tasks
/ functions
Functions
22 in github.com/EkardNT/bevy-tokio-tasks
⨍
Functions
22
◇
Types & classes
6
↓ 5 callers
Method
run_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 callers
Method
spawn_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 callers
Method
build
(&self, app: &mut App)
src/lib.rs:68
↓ 2 callers
Method
sleep_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 callers
Method
execute_main_thread_work
Execute all of the requested runnables on the main thread.
src/lib.rs:166
↓ 1 callers
Method
increment_ticks
(&self)
src/lib.rs:22
Method
current_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
Method
default
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
Function
demo
(runtime: ResMut<TokioTasksRuntime>, mut commands: Commands)
examples/change_clear_color.rs:25
Function
demo
(runtime: ResMut<TokioTasksRuntime>, mut commands: Commands)
examples/async_fn.rs:25
Function
demo
(runtime: ResMut<TokioTasksRuntime>)
examples/custom_schedule_label.rs:19
Function
demo
(runtime: ResMut<TokioTasksRuntime>)
examples/shutdown_after_sleep.rs:15
Function
demo
(runtime: ResMut<TokioTasksRuntime>, mut commands: Commands)
examples/current_thread_runtime.rs:32
Function
main
()
examples/change_clear_color.rs:17
Function
main
()
examples/async_fn.rs:17
Function
main
()
examples/custom_schedule_label.rs:8
Function
main
()
examples/shutdown_after_sleep.rs:7
Function
main
()
examples/current_thread_runtime.rs:17
Method
new
( ticks: Arc<AtomicUsize>, runtime: Runtime, update_watch_rx: tokio::sync::watch::Rece
src/lib.rs:120
Method
runtime
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
Function
tick_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
Function
update_colors
(mut ctx: TaskContext)
examples/async_fn.rs:30