|
|
|
@ -74,6 +74,18 @@ public abstract class QueueThing<I, O> implements Consumer<I> |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public List<Promise<I, O>> requestSpecific(List<I> inputs, Consumer<O> destination) |
|
|
|
|
{ |
|
|
|
|
List<Promise<I, O>> ret = new ArrayList<>(); |
|
|
|
|
for (I input : inputs) |
|
|
|
|
{ |
|
|
|
|
Promise<I, O> promise = new Promise<>(input, destination); |
|
|
|
|
ret.add(promise); |
|
|
|
|
handlePromise(promise); |
|
|
|
|
} |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public List<Promise<I, O>> request(int count, Consumer<O> destination) |
|
|
|
|
{ |
|
|
|
|
List<Promise<I, O>> ret = new ArrayList<>(); |
|
|
|
|