Forum: Ruby PurePromise - Promises/A+ with a twist.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cbe623408c24e48ea1ac0e086ec08b6b?d=identicon&s=25 Cameron M. (cameron_m)
on 2014-08-18 01:12
Hello,

I've recently written a promises library in ruby. It implements the
Promises/A+ spec almost exactly, with one difference - A promise
callback must return a promise.

This gives them some nice properties, particularly thenables can be
wrapped in promises. With the current Promises/A+ spec, trying to use an
object that happens to implement a then method as a value for a promise
will essentially break a promise chain, causing potentially hard to
debug problems.

It draws partially from Promise.rb
(https://github.com/lgierth/promise.rb), being agnostic about which
reactor library you use.

Here is the github link: https://github.com/cameron-martin/pure_promise.

I'd love feedback :)
This topic is locked and can not be replied to.