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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user