amphp / process

An async process dispatcher for Amp.
MIT License
235 stars 30 forks source link

#31 restart process #32

Closed Ekstazi closed 5 years ago

Ekstazi commented 5 years ago

Related to #31

Ekstazi commented 5 years ago

Main purpose of restart is to use it in https://github.com/amphp/parallel/issues/64. I'll provide pull request soon.

trowski commented 5 years ago

I'm not sure if this method makes sense or is necessary. No functionality is being added. Additionally, the method hides what is really happening behind a boolean argument – true means kill the process and start a new process, while false means wait for the process to exit normally and then start a new process.

trowski commented 5 years ago

Closing for the reasons outlined above. If we want to create a new, identical Process object, perhaps we should look at implementing __clone or a duplicate method that returns a new, un-started process with the same configuration.