“The truth will set you free, but first it will piss you off.” ― Joe Klaas, Twelve Steps to Happiness
1. Introduction
Invoking an external process from python and interacting with it can be quite tricky. This is especially true if the interaction is duplex i.e. involving both reading and writing to it. Such an interaction can cause deadlocks since both processes can end up waiting for output from the other. One way to avoid such deadlocks is to separate the reader and writer parts to different threads. We demonstrate such an approach in this article.
Continue reading “How to Avoid Deadlock when Calling External Command from Python”