mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-02-02 17:52:19 +00:00
fix comments
This commit is contained in:
parent
ff71d77a24
commit
563334da17
2 changed files with 7 additions and 9 deletions
|
@ -337,9 +337,9 @@ impl Runtime {
|
||||||
// form again.
|
// form again.
|
||||||
cycle_query.remove_cycle_participants(&cycle);
|
cycle_query.remove_cycle_participants(&cycle);
|
||||||
|
|
||||||
// Mark the cycle participants so they know to recover.
|
// Mark each cycle participant that has recovery set, along with
|
||||||
// This only matters for queries that have a fallback value specified;
|
// any frames that come after them on the same thread. Those frames
|
||||||
// the others will just unwind without storing any recovery information.
|
// are going to be unwound so that fallback can occur.
|
||||||
dg.for_each_cycle_participant(from_id, &mut from_stack, database_key_index, to_id, |aqs| {
|
dg.for_each_cycle_participant(from_id, &mut from_stack, database_key_index, to_id, |aqs| {
|
||||||
aqs.iter_mut()
|
aqs.iter_mut()
|
||||||
.skip_while(
|
.skip_while(
|
||||||
|
|
|
@ -121,14 +121,12 @@ impl DependencyGraph {
|
||||||
closure(&mut from_stack[prefix..]);
|
closure(&mut from_stack[prefix..]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// For each runtime that is blocked as part of this cycle excluding the current one,
|
/// Unblock each blocked runtime (excluding the current one) if some
|
||||||
/// execute `should_unblock` with its portion of the stack. If that function returns true,
|
/// query executing in that runtime is participating in cycle fallback.
|
||||||
/// then unblocks the given edge. The function is also invoked on the current runtime,
|
|
||||||
/// but in that case the return value (true or false) is simply returned directly as part
|
|
||||||
/// of the return tuple, since it is up to the caller to "unblock" or "block".
|
|
||||||
///
|
///
|
||||||
/// Returns a boolean (Current, Others) where:
|
/// Returns a boolean (Current, Others) where:
|
||||||
/// * Current is true if the current runtime should be unblocked and
|
/// * Current is true if the current runtime has cycle participants
|
||||||
|
/// with fallback;
|
||||||
/// * Others is true if other runtimes were unblocked.
|
/// * Others is true if other runtimes were unblocked.
|
||||||
pub(super) fn maybe_unblock_runtimes_in_cycle(
|
pub(super) fn maybe_unblock_runtimes_in_cycle(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
|
Loading…
Reference in a new issue