Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法让 BaseHTTPServer.HTTPServer 像 SocketServer.ThreadingTCPServer 一样多线程?
您可以简单地使用这两个类的线程混合使其成为多线程:)
虽然它不会对您的性能有太大帮助,但它至少是多线程的。
from SocketServer import ThreadingMixIn from BaseHTTPServer import HTTPServer class MultiThreadedHTTPServer(ThreadingMixIn, HTTPServer): pass