Multiprocessing

A WSGI server that does forking.

ForkingWSGIServer

A WSGI server that does forking.This class is identical to WSGIServer but handle each request in a new process using the ForkingMixIn. This is useful to handle web browsers pre-opening sockets, on which Server would wait indefinitely.

from sl.server import make_server, ForkingWSGIServer
make_server("localhost", 8080, demo_app, ForkingWSGIServer)

open http://localhost:8080 and see

you can do many requests to server.

WSGIServer handles one by one

ThreadingWSGIServer handles all at once asynchronously.

ForkingWSGIServer handles all at once asynchronously using new process to each request.

Your OS ( Operating System ) should support forking.

Last updated