/** * Delays completing of given future until the returned action is called. **/ public static Tpl <Future <A>, Action> delayUntilSignal <A>(this Future <A> future) { Promise <Unit> signalP; var f = future.zip(Future <Unit> .async(out signalP), (a, _) => a); Action act = () => signalP.tryComplete(F.unit); return(F.t(f, act)); }