You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's currently no support for long running processes in the process component. It would be cool to have dedicated Process subclass for this kind of task (e.g. for starting and stopping a Node.js server from a PHP/Symfomy application).
The text was updated successfully, but these errors were encountered:
I don't see anything that prevents you from running executing long running processes with the Process component. Can you be more explicit about what's missing?
Okay, my posting might have been a bit misleading.
With the current Process class, I can start a process, but it blocks the main thread, because it sits there and waits for new data to process until it eventually dies after finishing or after timeout.
It would be nice to have an API like the childprocess gem in Ruby:
$process = newSymfony\Component\Process\Process("env node server.js");
$process->run();
// do other stuff ...if ($process->isAlive()) {
$process->stop();
}
This would be really useful (e.g. for parallel downloads). With plain PHP you can start more than one process with proc_open(), here with Process class you can have only one running at one time (because of while loops in run() method waiting for the process to stop).
There's currently no support for long running processes in the process component. It would be cool to have dedicated
Process
subclass for this kind of task (e.g. for starting and stopping a Node.js server from a PHP/Symfomy application).The text was updated successfully, but these errors were encountered: