Issue #11852: Add missing imports and update tests.
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index 96384bd..3a48628 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -26,6 +26,8 @@
 
 import logging, socket, os, pickle, struct, time, re
 from stat import ST_DEV, ST_INO, ST_MTIME
+import queue
+import threading
 
 try:
     import codecs