-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Finer control over the DefaultTaskPoolOptions
#2163
Comments
I agree! Opening up customization would greatly benefit my project I believe. |
All fields are already public. |
II see, so this is what we currently have to do to modify the
I don't think that is the most 'elegant' way to write it, if the
I guess we can get around it by doing the first method, but I feel like the second way is more what I would expect. |
# Objective - Fix bevyengine#2163 - Allow configuration of thread pools through `DefaultTaskPoolOptions` ## Solution - `TaskPoolThreadAssignmentPolicy` was already public but not exported. Export it.
# Objective - Fix bevyengine#2163 - Allow configuration of thread pools through `DefaultTaskPoolOptions` ## Solution - `TaskPoolThreadAssignmentPolicy` was already public but not exported. Export it.
What problem does this solve or what need does it fill?
I would like finer control over the thread pool and I'm not sure how to modify the
DefaultTaskPoolOptions
to achieve this.Following the examples, it seems I can use some methods to create a
DefaultTaskPoolOptions
, e.g.:but this doesn't provide enough flexibility to e.g. disable the
io
pool or change the ratio ofasync_compute
tocompute
threads.I can create a
DefaultTaskPoolOptions
struct, but assigning values to some of the fields is not possible.The
task_pool_options
mod in the core lib is not marked as pub, which prevents defining e.g. aTaskPoolThreadAssignmentPolicy
.Ideally, I would do something like:
What solution would you like?
Define the
task_pool_options
mod aspub
to allow construction of aDefaultTaskPoolOptions
with all fields defined.What alternative(s) have you considered?
Alternatively, there could be more methods for the
DefaultTaskPoolOptions
which modifies thecompute
,async_compute
andio
pools. Perhaps aDefaultTaskPoolBuilder
could provide a way to configure aDefaultTaskPoolOptions
?The text was updated successfully, but these errors were encountered: