next method
Waits up to timeout for a ready hit; null on timeout.
Implementation
Future<BreakpointHit?> next(Duration timeout) async {
final now = ready;
if (now != null) return now;
final waiter = Completer<void>();
_waiters.add(waiter);
try {
await waiter.future.timeout(timeout);
} on TimeoutException {
_waiters.remove(waiter);
return null;
}
return ready;
}