Comments clarifying non-emptiness of threadset (#35388)
This commit is contained in:
parent
532b806bef
commit
ede9163633
|
@ -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>],
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue