You can create your own thread or forking class with mixin inheritance from SocketServer :
import SocketServer import BaseHTTPServer class ThreadingHTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): pass
This has its limits as it does not use a thread pool, is limited to GIT, etc., but it can help a little (with relatively little effort). Remember that requests will be served by several threads at the same time, so be sure to lock around access to global / shared data (except when such data is unchanged after launch) during the service of the request.
This SO question covers the same land (not particularly detailed).
source share