Skip to content

Commit

Permalink
Add justification of closure in create_task
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Feb 28, 2024
1 parent be1bc6c commit 821dee2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions unified-scheduler-logic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,12 @@ impl SchedulingStateMachine {
/// implementation of [`Page`] look-up by [`pubkey`](Pubkey) to callers. It's the 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 `Page` (and
/// caching/pruning if any) to the caller. `SchedulingStateMachine` guarantees that all of
/// shared owndership of `Page`s are released and Page state is identical to just after
/// created, if `has_no_active_task()` is `true`. Also note that this is desired for separation
/// of concern.
pub fn create_task(
transaction: SanitizedTransaction,
index: usize,
Expand Down

0 comments on commit 821dee2

Please sign in to comment.