javascript - Node child_process.spawn() wrapped in a promise- block event loop? -


from node documentation on synchronous process creation states if run child_process.spawnsync() will:

block node.js event loop, pausing execution of additional code until spawned process exits.

if used asynch version child_process.spawn() , wrapped in promise synch behavior, still block event loop?

the process using spawn takes second, using sse streams , don't won't keep new user getting stream if it's @ split second.

if used asynch version child_process.spawn() , wrapped in promise synch behavior, still block event loop?

no. node core functions async cannot made synchronous. promises can make code read more top-to-bottom if synchronous, actual mechanics remain asynchronous , non-blocking.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -