Hey All!

I just wanted to announce that I've pushed out the v0.4.0 release of 
suspend!

https://github.com/jmar777/suspend

This is a major update that involved a complete rewrite (and some 
substantial beefing up of the test suite).

There's a lot that's new in there, but here are some highlights:

   - The `resume` parameter is gone, so suspend never has to mess with your 
   arguments.
   - Stupid simple parallel execution! (well, concurrent execution, if you 
   want to be a jerk about it...)
   - Better error handling.
   - Some new API methods that better support various async scenarios.
   - Lots of new tests.
   - Beefed up the documentation with more examples and explanations.
   - Friendlier error messages for common foot-gun situations.

For those who aren't familiar with it, suspend provides callback-free 
control flow for Node using ES6 generators.  It's designed to play nice 
with Node's error-first callback conventions as well as promises.

For example, using suspend you can write code like this:

    var copyFile = suspend.async(function*(from, to) {
        var data = yield fs.readFile(from, resume());
        yield fs.writeFile(to, data, resume());
    });

...instead of like this:

    var copyFile = function(from, to, cb) {
        fs.readFile(from, function(err, data) {
            if (err) {
                return cb(err);
            }
            fs.writeFile(to, data, function(err) {
                if (err) {
                    return cb(err);
                }
                cb();
            });
        });
    };

One last thing: a huge thanks to Gorgi Kosev (Spion), who graciously 
provided a great deal of feedback for the API redesign.

Thanks for reading, and as always any feedback is greatly appreciated!

https://github.com/jmar777/suspend

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to