Skip to main content

evaluate

Function evaluate 

Source
pub fn evaluate(
    condition: &ResumeCondition,
    by_wp: &SignalsByWaitpoint<'_>,
) -> bool
Expand description

Evaluate a ResumeCondition against the set of signals delivered so far. Returns true iff the condition is satisfied.

signals is the full ordered list of ResumeSignals recorded against this suspension’s member_map. The function walks the declarative tree; it does NOT mutate inputs. Caller is responsible for reading the satisfied-signals view from ff_suspension_current.member_map under a SERIALIZABLE txn.

§Semantics (RFC-013 §2.4 + RFC-014 §2.1)

  • Single { waitpoint_key, matcher }true iff at least one signal targeting waitpoint_key matches matcher.
  • OperatorOnlyfalse (only an explicit operator resume satisfies this condition; not reachable through this evaluator).
  • TimeoutOnlyfalse (timeout-only suspensions resolve via timeout_behavior at timeout_at, not via signals).
  • Composite(AllOf { members })true iff every member evaluates true.
  • Composite(Count { n, count_kind, matcher, waitpoints })true iff at least n distinct satisfiers (by count_kind) match across signals targeting waitpoints and (optionally) matching matcher.