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
Defining the amount of threads in use for sync functions #19
Comments
The async loop runs in a single thread and "regular" functions decorated with Assuming your referring to the later, without any arguments ThreadPoolExecutor will overprovision (see I'm curious what your workload is that would you would notice this, is it really doing hundreds of IO bound operations? |
Thanks for the answer. Indeed it was the later. I'm not noticing it at the moment, but I was preemptively wondering how to control the number of threads, particularly at different steps. For example, due to a limitation on external resources, I could be limited by the number of threads accessing that resource but then local downstream processing could benefit from more threads. |
Makes sense. I'll close this for now since I think just assigning over Feel free to reopen, or open a PR if you'd like to add a cleaner API or something for setting the number of threads. My own opinion is that a function like |
How is the number of threads launched for an asynchronous function being decorated with
unsync
? Is there a possibility to define that number? If it's not possible out of the box, how could I start approaching that?The text was updated successfully, but these errors were encountered: