Stephen R. van den Berg wrote:
Stephen R. van den Berg wrote:
Martin Nilsson (Coppermist) @ Pike (-) developers forum wrote:
Promise p = Promise(); call_out(666, lambda(Future f) { f->success(1); }, p->depend()); call_out(123, lambda(Future f) { f->success(1); }, p->depend()); call_out(42, lambda(Future f) { f->success(1); }, p->depend()); p->on_success(...);
The changes are in. Including testsuite entries.
Promise p = Promise(); call_out(666, lambda(Promise q) { q->success(1); }, p->depend()); call_out(123, lambda(Promise q) { q->success(1); }, p->depend()); call_out(42, lambda(Promise q) { q->success(1); }, p->depend()); p->on_success(...);
Turns out, there was some fundamental flaw in the implementation. I built in another layer now to "materialise" a promise. Now it should work in all circumstances.