allegro / node-worker-nodes

A node.js library to run cpu-intensive tasks in a separate processes and not block the event loop.
Apache License 2.0
492 stars 33 forks source link

Worker and nodesocket server #34

Open Patrick88-vecoux opened 4 years ago

Patrick88-vecoux commented 4 years ago

FFMPEg runs in a worker, and in the main a node webserver who use sockets is waiting for instructions. But the web server can't respond during ffmpeg is running : why ??

kwiatkk1 commented 4 years ago

If a worker that runs ffmpeg is occupied and cannot accept a new task, it should not block any other code execution in other v8 contexts. So your webserver should answer on endpoints that are not, in their handling logic, waiting for ffmpeg worker to finish (i.e. status endpoints etc.).

Could you share a code snippet that describes your setup?