Registry / async / bevy-tasks

bevy-tasks

JSON →
library0.18.1rscratesunverified

A task executor for Bevy Engine, providing async task scheduling and parallel execution.

# Cargo.toml [dependencies] bevy_tasks = "0.18.1"
INSTALL
IMPORT
SIG · BEVY-TASKS
B
bevy-tasks
asyncrustv0.18.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TaskPool
use bevy_tasks::TaskPool;

Creates a task pool and spawns an async task.

use bevy_tasks::TaskPool; let pool = TaskPool::new(); let task = pool.spawn(async { 42 }); let result = futures_lite::future::block_on(task); assert_eq!(result, 42);
Debug
Known issues
gotchaRequires an async runtime like `futures-lite` or `tokio` to block on tasks.
fix
Add `futures-lite` to dependencies and use `block_on` to await tasks.
affects: >=0.18.0
Upgrade
Version history
0.18.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
45 hits · last 30 days
node
38
OpenAI (training)
1
Resources
bevy-tasks — cargo add bevy-tasks · libregistry