Skip to content
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

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