1 """@namespace IMP.parallel.manager_communicator
2 Classes for communicating from the manager to workers."""
10 """For communicating from the manager to workers."""
14 def __init__(self, manager_addr, lock):
15 _Communicator.__init__(self)
16 self._manager_addr = manager_addr
17 self._connect_to_manager()
20 def _connect_to_manager(self):
21 host, port, identifier = self._manager_addr
22 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
23 s.settimeout(self.connect_timeout)
24 s.connect((host, port))
25 s.sendall(identifier.encode(
'ascii'))
33 _Communicator._send(self, obj)
For communicating from the manager to workers.
Distribute IMP tasks to multiple processors or machines.