Many functions in NodeJS have a Sync pendant to the non-blocking functions.
Why is there no blocking pendant in the child_process module?
I've giving up as I tried to iterate over a directory and call for every
file
child.exec
how should my app now, that every process completed his task?
I don't sure I understand your issue.
But there is an example that iterate over a directory, to run test files
https://github.com/laverdet/node-fibers/blob/master/test.js
On Thu, Mar 14, 2013 at 5:32 PM, Sebi sebastian.tild...@googlemail.comwrote:
Many functions in NodeJS have a Sync pendant
There are tons of modules to help with asynchronous code.
https://npmjs.org/package/async is pretty popular. If you end up in
callback hell, you're probably not designing your code properly. Take some
time to look at various modules and find one with a style that you like.
On Thu, Mar 14, 2013
I have been using https://github.com/arturadib/shelljs for my execSync needs.
Works quite well
for building command line application in node that doesn't require concurrency
;)
On Thursday, March 14, 2013 at 9:40 PM, Scott González wrote:
There are tons of modules to help with asynchronous
Okay, but I think there should be an execSync like they do it in almost
every other module.
My oppertunity is, that every developer should have the ability to choose
if he goes the async or syncronously way.
Regards,
Seb
Am Donnerstag, 14. März 2013 21:40:08 UTC+1 schrieb Scott González:
Thank you, I know that there is already a module called exec-sync.
I only posted that here, to inform the devlopers of nodejs, that it could
be useful to attach some function in nodejs, that does that synchronously.
Some function like this:
stdout = execSync('ls ./mypath');
Am Donnerstag, 14.
That's a great oppertunity? but it's not in line with the structure and goals
of node.js.
Node has synchronous file operations. The reason it has sync file operations is
that there are many cases where you actually **want** to stop the entire server
until you get back data from the filesystem
Callback hell is a place you decide to go on your own. I'm not following you
down there...
Here is an alternative example made in callback heaven, where we embrace
asyncronous control flow like our first-born:
var async = require('async-array').async
var fs= require('fs')
var
But, what should you do if you can't serve anything after all sub-processes
have completed where work?
Am Donnerstag, 14. März 2013 22:02:11 UTC+1 schrieb Mikeal Rogers:
That's a great oppertunity? but it's not in line with the structure and
goals of node.js.
Node has synchronous file
I think you meant to say you can't serve anything *until* a sub-process has
completed its work
I've been using Node for CLI scripting, and a synchronous exec would be nice to
have just like the synchronous file IO is nice to have.
-- Dick
On Mar 14, 2013, at 2:22 PM, Sebi
Sorry, yes I've meant *until*.
Yes that's the second thing in CLI scripting. It's hard to write CLI
Applications if you have only the async option. I know it, because I've
tried to write a readline-application and the sync apps looking cleaner for
me.
I think I'm not the only person, who must
On 03/14/2013 11:02 PM, Mikeal Rogers wrote:
That's a great oppertunity? but it's not in line with the
structure and goals of node.js.
Node has synchronous file operations. The reason it has sync file
operations is that there are many cases where you actually **want**
to stop the entire
Most real world use cases for this are not for performance, they are for
shelling out to utilities, the alternatives are hideous as we found in nsh
: https://github.com/AvianFlu/nsh/wiki/nsh
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
Patch welcome.
https://github.com/joyent/node/issues/1167
On Thu, Mar 14, 2013 at 3:33 PM, Bradley Meck bradley.m...@gmail.com wrote:
Most real world use cases for this are not for performance, they are for
shelling out to utilities, the alternatives are hideous as we found in nsh :
14 matches
Mail list logo