Allow users to choose the exectuor for each async provider
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 72
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Before proceeding, is there an existing issue or discussion for this?
- I have done a search for similar issues and discussions.
Description
We currently have an async_execution module that handles the logic to switch between bevy's AsyncComputeTaskPool and our built-in SingleThreadedExecution task executors based on whether the user has chosen to activate the single_threaded_async feature.
In principle we could have a mechanism to let users choose a specific async executor for each provider that they use. This could be advantageous if they generally want to use the AsyncComputeTaskPool but sometimes need to run a Future that does not implement Send (in which case it needs to be run in the single-threaded executor). It's also possible that a user might have their own custom executor that they want to use, perhaps for only some of their async providers.
The major challenges are:
- Define stable public traits that let users inject custom executors
- Define a reasonable API for specifying what executor each async provider should use
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the async_execution module and trace how the single_threaded_async feature selects between Bevy's AsyncComputeTaskPool and SingleThreadedExecution. Define the stable public traits and per-provider executor API before implementation. Done means users can select an executor for each async provider, including a custom executor and a non-Send Future path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100