MCPcopy Index your code
hub / github.com/RustPython/RustPython / _run_server

Method _run_server

Lib/multiprocessing/managers.py:582–602  ·  view source on GitHub ↗

Create a server, report its address and run it

(cls, registry, address, authkey, serializer, writer,
                    initializer=None, initargs=())

Source from the content-addressed store, hash-verified

580
581 @classmethod
582 def _run_server(cls, registry, address, authkey, serializer, writer,
583 initializer=None, initargs=()):
584 '''
585 Create a server, report its address and run it
586 '''
587 # bpo-36368: protect server process from KeyboardInterrupt signals
588 signal.signal(signal.SIGINT, signal.SIG_IGN)
589
590 if initializer is not None:
591 initializer(*initargs)
592
593 # create server
594 server = cls._Server(registry, address, authkey, serializer)
595
596 # inform parent process of the server's address
597 writer.send(server.address)
598 writer.close()
599
600 # run the manager
601 util.info('manager serving at %r', server.address)
602 server.serve_forever()
603
604 def _create(self, typeid, /, *args, **kwds):
605 '''

Callers

nothing calls this directly

Calls 5

initializerFunction · 0.85
sendMethod · 0.45
closeMethod · 0.45
infoMethod · 0.45
serve_foreverMethod · 0.45

Tested by

no test coverage detected