MCPcopy
hub / github.com/pallets/werkzeug / ForkingWSGIServer

Class ForkingWSGIServer

src/werkzeug/serving.py:880–904  ·  view source on GitHub ↗

A WSGI server that handles concurrent requests in separate forked processes. Use :func:`make_server` to create a server instance.

Source from the content-addressed store, hash-verified

878
879
880class ForkingWSGIServer(ForkingMixIn, BaseWSGIServer):
881 """A WSGI server that handles concurrent requests in separate forked
882 processes.
883
884 Use :func:`make_server` to create a server instance.
885 """
886
887 multiprocess = True
888
889 def __init__(
890 self,
891 host: str,
892 port: int,
893 app: WSGIApplication,
894 processes: int = 40,
895 handler: type[WSGIRequestHandler] | None = None,
896 passthrough_errors: bool = False,
897 ssl_context: _TSSLContextArg | None = None,
898 fd: int | None = None,
899 ) -> None:
900 if not can_fork:
901 raise ValueError("Your platform does not support forking.")
902
903 super().__init__(host, port, app, handler, passthrough_errors, ssl_context, fd)
904 self.max_children = processes
905
906
907def make_server(

Callers 1

make_serverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected