diff options
| author | mat <git@matdoes.dev> | 2025-08-15 00:50:42 -0330 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-08-15 07:20:52 +0300 |
| commit | 980f41be2283857eecf113aa75f187fed35f4270 (patch) | |
| tree | 9add2135c110a921998932b43ac4b0b2c0d6409f /azalea/README.md | |
| parent | 6758d58109925fbe59bb5693296b995697faaf3a (diff) | |
| download | azalea-drasl-980f41be2283857eecf113aa75f187fed35f4270.tar.xz | |
add PathfinderOpts and clean up some pathfinder code
Diffstat (limited to 'azalea/README.md')
| -rw-r--r-- | azalea/README.md | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/azalea/README.md b/azalea/README.md index 3454ed2e..5bb18d38 100644 --- a/azalea/README.md +++ b/azalea/README.md @@ -89,6 +89,10 @@ Also note that just because something is an entity in the ECS doesn't mean that See the [Bevy Cheatbook](https://bevy-cheatbook.github.io/programming/ecs-intro.html) to learn more about Bevy ECS (and the ECS paradigm in general). +# Using a single-threaded Tokio runtime + +Due to the fact that Azalea clients store the ECS in a Mutex that's frequently locked and unlocked, bots that rely on the `Client` or `Swarm` types may run into race condition bugs (like out-of-order events and ticks happening at suboptimal moments) if they do not set Tokio to use a single thread with `#[tokio::main(flavor = "current_thread")]`. This may change in a future version of Azalea. Setting this option will usually not result in a performance hit, and Azalea internally will keep using multiple threads for running the ECS itself (because Tokio is not used for this). + # Debugging Azalea uses several relatively complex features of Rust, which may make debugging certain issues more tricky if you're not familiar with them. @@ -109,9 +113,4 @@ If your code is simply hanging, it might be a deadlock. Enable `parking_lot`'s ` Backtraces are also useful, though they're sometimes hard to read and don't always contain the actual location of the error. Run your code with `RUST_BACKTRACE=1` to enable full backtraces. If it's very long, often searching for the keyword "azalea" will help you filter out unrelated things and find the actual source of the issue. -# Using a single-threaded Tokio runtime - -Due to the fact that Azalea clients store the ECS in a Mutex that's frequently locked and unlocked, bots that rely on the `Client` or `Swarm` types may run into race condition bugs (like out-of-order events and ticks happening at suboptimal moments) if they do not set Tokio to use a single thread with `#[tokio::main(flavor = "current_thread")]`. This may change in a future version of Azalea. Setting this option will usually not result in a performance hit, and Azalea internally will keep using multiple threads for running the ECS itself (because Tokio is not used for this). - -[`azalea_client`]: https://docs.rs/azalea-client [`bevy_log`]: https://docs.rs/bevy_log |
