fix comments

This commit is contained in:
Niko Matsakis 2021-11-13 12:02:25 -05:00
parent ff71d77a24
commit 563334da17
2 changed files with 7 additions and 9 deletions

View file

@ -337,9 +337,9 @@ impl Runtime {
// form again.
cycle_query.remove_cycle_participants(&cycle);
// Mark the cycle participants so they know to recover.
// This only matters for queries that have a fallback value specified;
// the others will just unwind without storing any recovery information.
// Mark each cycle participant that has recovery set, along with
// any frames that come after them on the same thread. Those frames
// 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| {
aqs.iter_mut()
.skip_while(

View file

@ -121,14 +121,12 @@ impl DependencyGraph {
closure(&mut from_stack[prefix..]);
}
/// For each runtime that is blocked as part of this cycle excluding the current one,
/// execute `should_unblock` with its portion of the stack. If that function returns true,
/// 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".
/// Unblock each blocked runtime (excluding the current one) if some
/// query executing in that runtime is participating in cycle fallback.
///
/// 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.
pub(super) fn maybe_unblock_runtimes_in_cycle(
&mut self,