A list of links on parallel execution of processes / threads within Python
-
https://stackoverflow.com/questions/16071866/non-blocking-subprocess-call
-
https://github.com/mortoray/shelljob/blob/master/src/shelljob/proc.py non async
-
https://code.activestate.com/recipes/440554-module-to-allow-asynchronous-subprocess-use-on-win/
-
https://www.nurmatova.com/subprocesses-and-multithreading.html
-
https://docs.python.org/3/library/threading.html#condition-objects
If you want a non-blocking approach, don't use process.communicate(). If you set the subprocess.Popen() argument stdout to PIPE, you can read from process.stdout and check if the process still runs using process.poll().
- https://gist.github.com/mckaydavis/e96c1637d02bcf8a78e7
- https://gist.github.com/kirpit/1306188/ab800151c9128db3b763bb9f9ec19fda0df3a843
- https://pymotw.com/3/threading/
- https://pymotw.com/3/multiprocessing/communication.html#process-pools
- https://stackoverflow.com/questions/2332765/lock-mutex-semaphore-whats-the-difference/45567101#45567101
- https://stackoverflow.com/questions/63544501/python-asyncio-how-to-have-a-producer-consumer-pattern-linked-to-a-watchdog-pro
- https://stackoverflow.com/questions/28492103/how-to-combine-python-asyncio-with-threads
- https://gist.github.com/mivade/f4cb26c282d421a62e8b9a341c7c65f6
- https://stackoverflow.com/questions/54525836/where-do-i-catch-the-keyboardinterrupt-exception-in-this-async-setup
- https://stackoverflow.com/questions/40571786/asyncio-coroutine-vs-async-def
- https://docs.python.org/3/library/asyncio-subprocess.html