From 72460fa68ba98f5aa94cdc842070884403c0fc73 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Mon, 9 Sep 2013 18:48:24 -0500 Subject: Get "stopped" back into repr(Thread) when appropriate. Due to recent changes, a Thread doesn't know that it's over before someone calls .join() or .is_alive(). That meant repr(Thread) continued to include "started" (and not "stopped") before one of those methods was called, even if hours passed since the thread ended. Repaired that. --- Lib/threading.py | 1 + 1 file changed, 1 insertion(+) (limited to 'Lib/threading.py') diff --git a/Lib/threading.py b/Lib/threading.py index 1ad22a430c..26d1018d3e 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -574,6 +574,7 @@ class Thread: status = "initial" if self._started.is_set(): status = "started" + self.is_alive() # easy way to get ._is_stopped set when appropriate if self._is_stopped: status = "stopped" if self._daemonic: -- cgit v1.2.1