run method
- Future<
void> poll()
Runs poll unless the one before still waits for its answer.
Implementation
Future<void> run(Future<void> Function() poll) async {
if (_busy) {
return;
}
_busy = true;
try {
await poll();
} finally {
_busy = false;
}
}