Skip to content

Commit

Permalink
add comments for parameter in OwnedTasks.close_and_shutdown_all
Browse files Browse the repository at this point in the history
  • Loading branch information
wathenjiang committed Sep 22, 2023
1 parent c15c0bd commit 6706a35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tokio/src/runtime/task/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ impl<S: 'static> OwnedTasks<S> {

/// Shuts down all tasks in the collection. This call also closes the
/// collection, preventing new items from being added.
/// The parameter start should be random among different worker threads
/// to reduce lock conflicts during shutdown.
/// Initiate shutting down the segment indexed by the start, and reset to 0
/// once the segment_size is reached, continuing until start - 1, it works like a ring.
pub(crate) fn close_and_shutdown_all(&self, start: usize)
where
S: Schedule,
Expand Down

0 comments on commit 6706a35

Please sign in to comment.