Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Comments clarifying non-emptiness of threadset #35388

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ impl PrioGraphScheduler {
/// If the `chain_thread` is available, this thread will be selected, regardless of
/// load-balancing.
///
/// Panics if the `thread_set` is empty.
/// Panics if the `thread_set` is empty. This should never happen, see comment
/// on `ThreadAwareAccountLocks::try_lock_accounts`.
fn select_thread(
thread_set: ThreadSet,
batches_per_thread: &[Vec<SanitizedTransaction>],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ impl ThreadAwareAccountLocks {
/// `allowed_threads` is a set of threads that the caller restricts locking to.
/// If accounts are schedulable, then they are locked for the thread
/// selected by the `thread_selector` function.
/// `thread_selector` is only called if all accounts are schdulable, meaning
/// that the `thread_set` passed to `thread_selector` is non-empty.
pub(crate) fn try_lock_accounts<'a>(
&mut self,
write_account_locks: impl Iterator<Item = &'a Pubkey> + Clone,
Expand Down
Loading