Robustify Process handling and extend a bit#127
Conversation
Python from 3.2 on support timeouts on subprocesses directly subprocess32 backports that to Python 2
Easier to read. Also, `timeout=None` because that's what modern subprocess expects
There are many caveats, but at least Ctrl-C now works as expected.
There were out-of-order writes to the persitence file when there were multiple threads. This confines file-writing to a dedicated thread that works a Queue.
|
Sorry, I don't think I will get to this or the other PR in a while. So, just briefly: I suppose, I am getting a bit defensive here. But so far, the current solution seem to have worked. While the new one is, well, new to me. |
|
What was broken?
This fixes both. |
|
Also, there were differences for Python2 and Python3 regarding process handling. With |
The existing parallel scheduler behaves as is (With common behavior lifted to a new base clase). A new parallel scheulder maintains a work queue and the workers retrieve directly from there. a distinction is made for py2 vs py3, to make use of the built-in thread pool executor when possible. No new magic so far
|
I reverted the changes to the existing parallel scheduler and made a new one. |
(trivial in default exclusive case, not possible in non-exclusive case)
subprocess32