Skip to content

Commit

Permalink
fix: beta doc lints in task pool
Browse files Browse the repository at this point in the history
I chose to remove the extended documentation for `TaskPool::executor`. It references `TaskPoolInner` which was added in bevyengine#384 when `bevy_tasks` was first created, but that struct was later removed in bevyengine#2250. James may be able to rewrite the comment, but I do not know enough about the task pool to write anything.
  • Loading branch information
BD103 committed Apr 9, 2024
1 parent 956604e commit dd274dc
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions crates/bevy_tasks/src/task_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct TaskPoolBuilder {
/// If set, we'll use the given stack size rather than the system default
stack_size: Option<usize>,
/// Allows customizing the name of the threads - helpful for debugging. If set, threads will
/// be named <thread_name> (<thread_index>), i.e. "MyThreadPool (2)"
/// be named `<thread_name> (<thread_index>)`, i.e. `"MyThreadPool (2)"`.
thread_name: Option<String>,

on_thread_spawn: Option<Arc<dyn Fn() + Send + Sync + 'static>>,
Expand Down Expand Up @@ -106,14 +106,10 @@ impl TaskPoolBuilder {
/// will still execute a task, even if it is dropped.
#[derive(Debug)]
pub struct TaskPool {
/// The executor for the pool
///
/// This has to be separate from TaskPoolInner because we have to create an `Arc<Executor>` to
/// pass into the worker threads, and we must create the worker threads before we can create
/// the `Vec<Task<T>>` contained within `TaskPoolInner`
/// The executor for the pool.
executor: Arc<async_executor::Executor<'static>>,

/// Inner state of the pool
// The inner state of the pool.
threads: Vec<JoinHandle<()>>,
shutdown_tx: async_channel::Sender<()>,
}
Expand Down

0 comments on commit dd274dc

Please sign in to comment.