| 148 | 'debug_info', 'number_of_objects', 'dummy', 'incref', 'decref'] |
| 149 | |
| 150 | def __init__(self, registry, address, authkey, serializer): |
| 151 | if not isinstance(authkey, bytes): |
| 152 | raise TypeError( |
| 153 | "Authkey {0!r} is type {1!s}, not bytes".format( |
| 154 | authkey, type(authkey))) |
| 155 | self.registry = registry |
| 156 | self.authkey = process.AuthenticationString(authkey) |
| 157 | Listener, Client = listener_client[serializer] |
| 158 | |
| 159 | # do authentication later |
| 160 | self.listener = Listener(address=address, backlog=128) |
| 161 | self.address = self.listener.address |
| 162 | |
| 163 | self.id_to_obj = {'0': (None, ())} |
| 164 | self.id_to_refcount = {} |
| 165 | self.id_to_local_proxy_obj = {} |
| 166 | self.mutex = threading.Lock() |
| 167 | |
| 168 | def serve_forever(self): |
| 169 | ''' |