MCPcopy Create free account
hub / github.com/python/cpython / get_connection

Method get_connection

Lib/multiprocessing/resource_sharer.py:82–88  ·  view source on GitHub ↗

Return connection from which to receive identified resource.

(ident)

Source from the content-addressed store, hash-verified

80
81 @staticmethod
82 def get_connection(ident):
83 '''Return connection from which to receive identified resource.'''
84 from .connection import Client
85 address, key = ident
86 c = Client(address, authkey=process.current_process().authkey)
87 c.send((key, os.getpid()))
88 return c
89
90 def stop(self, timeout=None):
91 '''Stop the background thread and clear registered resources.'''

Callers 2

detachMethod · 0.80
detachMethod · 0.80

Calls 2

ClientFunction · 0.70
sendMethod · 0.45

Tested by

no test coverage detected