Detects query cycles by using depth first search over all active query jobs.
If a query cycle is found it will break the cycle by finding an edge which
uses a query latch and then resuming that waiter.
Finds out if thereβs a path to the compiler root (aka. code which isnβt in a query)
from query without going through any of the queries in visited.
This is achieved with a depth first search.
Looks for a query cycle by doing a depth first search starting at query.
span is the reason for the query to execute. This is initially DUMMY_SP.
If a cycle is detected, this initial value is replaced with the span causing
the cycle. stack will contain just the cycle on return if detected.
Finds the query job closest to the root that is for the same query method as id
(but not necessarily the same query key), and returns information about it.
The locaton of a resumable waiter. The usize is the index into waiters in the queryβs latch.
Weβll use this to remove the waiter if weβre waking it up in find_and_process_cycle.