On some architectures, using threading.TIMEOUT_MAX for the timeout parameter can overflow causing Condition.wait() to return immediately.
As an example, running the following will block on amd64 but return immediately on i386:
Python 3.6.6 (default, Jun 27 2018, 14:44:17)
[GCC 8.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading
>>> ready = threading.Event()
>>> ready.wait(threading.TIMEOUT_MAX)
False
Instead of relying on TIMEOUT_MAX, remove it and wait forever. This patch should fix #2 and #3.
On some architectures, using threading.TIMEOUT_MAX for the timeout parameter can overflow causing Condition.wait() to return immediately.
As an example, running the following will block on amd64 but return immediately on i386:
Instead of relying on TIMEOUT_MAX, remove it and wait forever. This patch should fix #2 and #3.