2
0
mirror of https://github.com/esiur/esiur-dart.git synced 2026-04-03 17:58:21 +00:00

Static Calling

This commit is contained in:
2022-08-07 23:09:25 +03:00
parent 8eca096b94
commit f5d3ea9ee5
9 changed files with 431 additions and 86 deletions

View File

@@ -126,6 +126,10 @@ class AsyncReply<T> implements Future<T> {
}
AsyncReply<T> timeout(Duration timeLimit, {FutureOr<T?> onTimeout()?}) {
Future.delayed(timeLimit, () {
if (!_resultReady && _exception == null) onTimeout?.call();
});
return this;
}