bevyengine / bevyengine/bevy

Correct usage of `ComputeTaskPool` is unclear

Open
#16,504 2 comments 0 reactions 0 assignees View on GitHub
A-Tasks C-Docs D-Straightforward S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## How can Bevy's documentation be improved?

I used [`ComputeTaskPool`](https://docs.rs/bevy/latest/bevy/tasks/prelude/struct.ComputeTaskPool.html) to queue several computationally heavy tasks that I wanted to run in the background, but complete by the next frame:
https://github.com/Crusaders-of-Rust/cormine/blob/b0d0a65207695e3c8b6266de71da4d80f706bb12/src/main.rs#L246-L320

However, checking frame counts, it seems to take up to 18 frames for the sync tasks to be ready. It's not clear from these docs how exactly this pool should be used to queue tasks for completion by the next frame.

Contributor guide

Open the contributing guide

Research direction

Start with the ComputeTaskPool documentation on docs.rs and the linked example in src/main.rs around lines 246-320. Trace how the computational tasks are queued and synchronized, then clarify in the documentation how to use the pool when tasks are expected to complete by the next frame and explain the observed delay.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.