13b602ee3f
This PR is easiest to review commit by commit. Followup on https://github.com/bevyengine/bevy/pull/1309#issuecomment-767310084 - [x] Switch from a bash script to an xtask rust workspace member. - Results in ~30s longer CI due to compilation of the xtask itself - Enables Bevy contributors on any platform to run `cargo ci` to run linting -- if the default available Rust is the same version as on CI, then the command should give an identical result. - [x] Use the xtask from official CI so there's only one place to update. - [x] Bonus: Run clippy on the _entire_ workspace (existing CI setup was missing the `--workspace` flag - [x] Clean up newly-exposed clippy errors ~#1388 builds on this to clean up newly discovered clippy errors -- I thought it might be nicer as a separate PR.~ Nope, merged it into this one so CI would pass. Co-authored-by: Carter Anderson <mcanders1@gmail.com> |
||
---|---|---|
.. | ||
examples | ||
src | ||
Cargo.toml | ||
README.md |
bevy_tasks
A refreshingly simple task executor for bevy. :)
This is a simple threadpool with minimal dependencies. The main usecase is a scoped fork-join, i.e. spawning tasks from
a single thread and having that thread await the completion of those tasks. This is intended specifically for
bevy
as a lighter alternative to rayon
for this specific usecase. There are also utilities for
generating the tasks from a slice of data. This library is intended for games and makes no attempt to ensure fairness
or ordering of spawned tasks.
It is based on async-executor
, a lightweight executor that allows the end user to manage their own threads.
async-executor
is based on async-task, a core piece of async-std.
Dependencies
A very small dependency list is a key feature of this module
├── async-executor
│ ├── async-task
│ ├── concurrent-queue
│ │ └── cache-padded
│ └── fastrand
├── num_cpus
│ └── libc
├── parking
└── futures-lite