Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to choose the exectuor for each async provider #13

Open
1 of 3 tasks
mxgrey opened this issue Aug 3, 2024 · 0 comments
Open
1 of 3 tasks

Allow users to choose the exectuor for each async provider #13

mxgrey opened this issue Aug 3, 2024 · 0 comments

Comments

@mxgrey
Copy link
Contributor

mxgrey commented Aug 3, 2024

Before proceeding, is there an existing issue or discussion for this?

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant