aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/task_pool.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-10-12 23:01:54 +0300
committermat <git@matdoes.dev>2025-10-12 23:01:54 +0300
commitee2575794e91b9457a74a95daf1dcc707058cd58 (patch)
treedf725850ef18ded5ce3f6552e17095d0f704ae84 /azalea-client/src/plugins/task_pool.rs
parent1a1402954b07cd77615d0afc026c73b008787f51 (diff)
downloadazalea-drasl-ee2575794e91b9457a74a95daf1dcc707058cd58.tar.xz
upgrade deps and clean up lots of doc comments
Diffstat (limited to 'azalea-client/src/plugins/task_pool.rs')
-rw-r--r--azalea-client/src/plugins/task_pool.rs18
1 files changed, 6 insertions, 12 deletions
diff --git a/azalea-client/src/plugins/task_pool.rs b/azalea-client/src/plugins/task_pool.rs
index 56ebc7cf..5e9031d7 100644
--- a/azalea-client/src/plugins/task_pool.rs
+++ b/azalea-client/src/plugins/task_pool.rs
@@ -34,8 +34,9 @@ fn tick_global_task_pools(_main_thread_marker: Option<NonSend<NonSendMarker>>) {
tick_global_task_pools_on_main_thread();
}
-/// Helper for configuring and creating the default task pools. For end-users
-/// who want full control, set up [`TaskPoolPlugin`]
+/// Helper for configuring and creating the default task pools.
+///
+/// For end-users who want full control, set up [`TaskPoolPlugin`]
#[derive(Clone, Resource)]
pub struct TaskPoolOptions {
/// If the number of physical cores is less than min_total_threads, force
@@ -85,15 +86,6 @@ impl Default for TaskPoolOptions {
}
impl TaskPoolOptions {
- // /// Create a configuration that forces using the given number of threads.
- // pub fn with_num_threads(thread_count: usize) -> Self {
- // TaskPoolOptions {
- // min_total_threads: thread_count,
- // max_total_threads: thread_count,
- // ..Default::default()
- // }
- // }
-
/// Inserts the default thread pools into the given resource map based on
/// the configured values
pub fn create_default_pools(&self) {
@@ -160,7 +152,9 @@ pub struct TaskPoolThreadAssignmentPolicy {
/// Under no circumstance use more than this many threads for this pool
pub max_threads: usize,
/// Target using this percentage of total cores, clamped by min_threads and
- /// max_threads. It is permitted to use 1.0 to try to use all remaining
+ /// max_threads.
+ ///
+ /// It is permitted to use 1.0 to try to use all remaining
/// threads
pub percent: f32,
}