MCPcopy Index your code
hub / github.com/alievk/avatarify-python / __init__

Method __init__

afy/predictor_remote.py:23–46  ·  view source on GitHub ↗
(self, *args, in_addr=None, out_addr=None, **kwargs)

Source from the content-addressed store, hash-verified

21
22class PredictorRemote:
23 def __init__(self, *args, in_addr=None, out_addr=None, **kwargs):
24 self.in_addr = in_addr
25 self.out_addr = out_addr
26 self.predictor_args = (args, kwargs)
27 self.timing = AccumDict()
28 self.log = Logger('./var/log/predictor_remote.log', verbose=opt.verbose)
29
30 self.send_queue = mp.Queue(QUEUE_SIZE)
31 self.recv_queue = mp.Queue(QUEUE_SIZE)
32
33 self.worker_alive = mp.Value('i', 0)
34
35 self.send_process = mp.Process(
36 target=self.send_worker,
37 args=(self.in_addr, self.send_queue, self.worker_alive),
38 name="send_process"
39 )
40 self.recv_process = mp.Process(
41 target=self.recv_worker,
42 args=(self.out_addr, self.recv_queue, self.worker_alive),
43 name="recv_process"
44 )
45
46 self._i_msg = -1
47
48 def start(self):
49 self.worker_alive.value = 1

Callers

nothing calls this directly

Calls 2

AccumDictClass · 0.90
LoggerClass · 0.90

Tested by

no test coverage detected