EasyProcess icon indicating copy to clipboard operation
EasyProcess copied to clipboard

Use subprocess.Popen.wait and .communicate with timeout

Open Vogtinator opened this issue 2 years ago • 1 comments

FWICT, the code uses a daemon thread to implement a timeout, but since python 3.3, the Popen class supports passing timeouts to wait and communicate. Maybe you could use them to replace the daemon thread?

https://github.com/ponty/EasyProcess/blob/4b3f5ab487ec46133e361958d6061262bfad91c3/easyprocess/init.py#L254-L255

https://github.com/ponty/EasyProcess/blob/4b3f5ab487ec46133e361958d6061262bfad91c3/easyprocess/init.py#L273-L274

Vogtinator avatar Dec 14 '21 13:12 Vogtinator

Thanks for the info! I check how I can integrate this parameter to the code.

ponty avatar Jan 08 '22 08:01 ponty