Issue #14308: Fix an exception when a "dummy" thread is in the threading module's active list after a fork().
diff --git a/Lib/threading.py b/Lib/threading.py
index ff32dfb..2290855 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -605,6 +605,10 @@
                     pass
 
     def __stop(self):
+        # DummyThreads delete self.__block, but they have no waiters to
+        # notify anyway (join() is forbidden on them).
+        if not hasattr(self, '_Thread__block'):
+            return
         self.__block.acquire()
         self.__stopped = True
         self.__block.notify_all()