2017-08-12 0:34 GMT+02:00 Ryan Smith-Roberts <rmsr@lab.net>:
Since ThreadingMixIn also leaks threads, server_close() could grow a timeout flag (following the socket module timeout convention) and maybe a terminate boolean. ThreadingMixIn could then also be fixed. I'm not sure how useful that is though, since I'd bet almost all users of socketserver exit the process shortly after server_close(). Plus it can't be backported to the feature-freeze branches.
Oh. It took me 2 months, but I finally identified why *sometimes*, test_logging fails with warning about threads. It's exactly because of the weak socketserver.ThreadingMixIn which leaves running threads in the background, even after server_close(). I just opened a new issue: "socketserver.ThreadingMixIn leaks running threads after server_close()" https://bugs.python.org/issue31233 Victor