There are async lib that helps do things synchronously. Example is:
async.series([
function1,
function2,
function3
]);
Making node optionally syncronous is certainly a stupid thing, node
made syncronous will be PHP. Why not to use PHP to make things
synchronously?
Sometimes authors do another stupid thing by making syncronous things
looks to be asyncronous. There is XML parser that is used like this
var parser = new GreatXmlParser;
parser.parse(xml, function onFinished(err, doc) {...});
Why not just return doc in parse? I never believe XML parsing in
memory is asyncronous. I am not pointing to the real parser, just
pointing that sometimes syncronous things should be syncronous.
--
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