2
0
mirror of https://github.com/esiur/esiur-dart.git synced 2025-09-29 18:53:19 +00:00
This commit is contained in:
2019-12-02 03:29:30 +03:00
parent 5886cbbdac
commit 9c15b830dd
16 changed files with 298 additions and 30 deletions

View File

@@ -11,6 +11,8 @@ class AsyncBag<T> extends AsyncReply<List<T>>
seal()
{
//print("SEALED");
if (_sealedBag)
return;
@@ -28,8 +30,11 @@ class AsyncBag<T> extends AsyncReply<List<T>>
{
_results[index] = r;
_count++;
//print("Seal ${_count}/${_results.length}");
if (_count == _results.length)
trigger(_results);
}).error((ex){
triggerError(ex);
});
}
}

View File

@@ -1,4 +1,4 @@
library esiur;
library esyur;
import 'AsyncReply.dart';

View File

@@ -107,18 +107,7 @@ class AsyncReply<T> implements Future<T>
{
return this;
}
AsyncReply<T> _then_old(Function(T) callback)
{
_callbacks.add(callback);
if (_resultReady)
callback(result);
return this;
}
AsyncReply<T> error(Function(dynamic) callback)
{
_errorCallbacks.add(callback);

View File

@@ -1,4 +1,4 @@
// library esiur;
// library esyur;
import 'IEventHandler.dart';