The tragic tale of the deadlocking Python queue
This is a story about how very difficult it is to build concurrent programs. It’s also a story about a bug in Python’s Queue class, a class which happens to be the easiest way to make concurrency simple in Python. This is not a happy story: this is a tragedy, a story of deadlocks and despair. This story will take you on a veritable roller coaster of emotion and elucidation, as you: Shiver at the horror that is concurrent programming! Bask in the simplicity of using Queue! Frown at a mysteriously freezing program! Marvel as you discover how to debug deadlocks with gdb! Groan as reentrancy rears its ugly head! Gasp as you realize that this bug is not theoretical! Weep when you read the response of Python’s maintainers! Rejoice when you hear the Python’s maintainers new response! Join me, then, as I share this tale of woe.
Code Without Rules