-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Configurable futures
executor
#63
Comments
What would be some examples of use cases for this? |
As far as I'm aware only performance. One might want to use the executor that is more tailored for a particular use case. One example would be NUMA awareness, currently not supported by Or simply more peformance, Additionally, this should really be completly non-disruptive for EDIT: I failed to mention all the other executors, but beside |
I'd like to gather a bit more of information before comitting to a solution here.
The current use case for async actions is mostly light I/O work that would block the GUI if done sequentially. For instance, opening/saving files, performing HTTP requests, etc. Not really meant to spawn hundreds of thousands of concurrent actions. It is hard for me to picture a conventional use case where the executor will matter. We need to also keep in mind that advanced users will always be able to roll their own event loop and use
At the very least, we will need to expose some way to configure the executor. While we could do this with a provided method in the |
Yeah that's good enough I would say. |
A major reason to do this is that |
@Nemo157 Yesterday, we had a related discussion in our Zulip server. |
I see that you used
ThreadPool
as the executor. Would you consider making this only the default but allowing to pass a different executor with the help offutures::task::Spawn
?That way a user can implement his own executor or use libraries that support
Spawn
, hopefully tokio or async-std at some point.Happy to make a PR for this if you approve.
Originally posted by @daxpedda in #62 (comment)
The text was updated successfully, but these errors were encountered: