ACCEPTED:
I updated Futures.join() such that
Futures.join(p1,s2,s3,p3, {timeout: 0}).fail(function () {
Futures.log("Holy Freakin' Fast Failure!");
});
Futures.join([p1,s2,s3,p3], {timeout: 0}).fail(function () {
Futures.log("Holy Freakin' Fast Failure!");
});
PROPOSED (please comment):
To me it would almost make sense also to have except that I like having immediates as a shortcut to Futures.promise().fulfill('data').passable().
Futures.promise({timeout: n})
I plan to add a .cancel(). I saw this on the CommonJS wiki.
It does make sense to me to add a timeout to individual subscriptions
Futures.subscription({timeout: n})
I don't know how useful a timeout would be, but I think I'll implement it such that "All deliveries must have updated at least once in N ms"
Futures.synchronization(s1, s2, s3, {timeout: n})
I plan to add .stop() which will cause deliveries to stop until .resume()
This will reset the subscription to an empty state (data-wise, not callback-wise).
When .resume() is called, all subscriptions must make at least one delivery before the next synchronized delivery.
I also plan to implement stopUntilNextDelivery() which would be equivalent to .stop().resume()
I haven't grokked the CommonJS proposals yet, but I will this weekend. I'm still coming up with use cases.
AJ ONeal