EasyProcess
EasyProcess copied to clipboard
Use subprocess.Popen.wait and .communicate with timeout
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
Thanks for the info! I check how I can integrate this parameter to the code.