There are ways to write asynchronous code (non blocking) without callbacks. 
For example, with streamline.js (https://github.com/Sage/streamlinejs), 
you'd write:

function get_next_id(_) { 
        return rclient.incr("next_id", _);
} 

var next_id = get_next_id(_);

which you could just write as:

var next_id = rclient_incr("next_id", _);

Bruno

On Monday, March 19, 2012 2:15:03 AM UTC+1, rhdoenges wrote:
>
> Yes, you have to make get_next_id take a callback. Otherwise, you are
> creating blocking code, which is a Bad Thing.
>
> -- 
> Ryan Doenges
>

-- 
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

Reply via email to