Skip to content

Commit

Permalink
Document UsageQueueLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Mar 7, 2024
1 parent 03a0bd1 commit fe2efa2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion unified-scheduler-logic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ impl SchedulingStateMachine {
/// caller's responsibility to ensure the same instance is returned from the closure, given a
/// particular pubkey.
///
/// Closure is used here to delegate the responsibility of general ownership of `UsageQueue`
/// Closure is used here to delegate the responsibility of primary ownership of `UsageQueue`
/// (and caching/pruning if any) to the caller. `SchedulingStateMachine` guarantees that all of
/// shared owndership of `UsageQueue`s are released and UsageQueue state is identical to just
/// after created, if `has_no_active_task()` is `true`. Also note that this is desired for
Expand Down
6 changes: 6 additions & 0 deletions unified-scheduler-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,12 @@ mod chained_channel {
}
}

/// The primary owner of all [`UsageQueue`]s used for particular [`PooledScheduler`].
///
/// Currently, the simplest implementation. This grows memory usage in unbounded way. Cleaning will
/// be added later. This struct is here to be put outside `solana-unified-scheduler-logic` for the
/// crate's original intent (separation of logics from this crate). Some practical and mundane
/// pruning will be implemented in this type.
#[derive(Default, Debug)]
pub struct UsageQueueLoader {
usage_queues: DashMap<Pubkey, UsageQueue>,
Expand Down

0 comments on commit fe2efa2

Please sign in to comment.