Merged hanged order of cleanup operations from 3.2.
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 2279952..3adeaec 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -611,8 +611,8 @@
                     r = logging.makeLogRecord({'msg': 'testing' })
                     h.handle(r)
             finally:
-                h.close()
                 remover.join()
+                h.close()
                 if os.path.exists(fn):
                     os.unlink(fn)