Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Document possible re-entrancy on runNextTimer
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice committed Oct 4, 2024
1 parent 6227b63 commit 6fb6a8c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/fake_async.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,12 @@ class FakeAsync {
///
/// Because multiple timers may be due at the same time, a call to this
/// method may leave the time advanced to where other timers are due.
/// Doing an `elapse(Duration.zero)` afterwards may trigger more timers.
/// Calling `elapse(Duration.zero)` afterwards may trigger more timers.
///
/// If microtasks or timer callbacks make their own calls to methods on this
/// [FakeAsync], then a call to this method may indirectly cause more timers
/// to run beyond the timer it runs directly, and may cause [elapsed] to
/// advance beyond [until]. Any such timers are ignored in the return value.
///
/// Returns `true` if a timer was run, `false` otherwise.
bool runNextTimer({Duration? until}) {
Expand Down

0 comments on commit 6fb6a8c

Please sign in to comment.