Settings

Theme

Show HN: asyncblock - Node.js async flow control built on fibers

github.com

3 points by scriby 14 years ago · 2 comments

Reader

keyston 14 years ago

Impressive work.. Next time I work with node I'll keep this in mind. One thing that would be nice is the ability to chain blocks. I can't think of a example at the moment but didn't see any examples that showed if this is possible already or is that the purpose of .defer()?

  • scribyOP 14 years ago

    Chaining blocks works, for instance something like:

    var queryResult = getDatabase().sync(). getCollection().sync(). fetch({ query }).sync();

    Assuming all those are asynchronous operations.

    Chaining wouldn't work with .defer() right now. It only supports syntax like "var x = something().defer()".

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection