mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-07 13:32:09 -07:00
SubprocessorBase fix
This commit is contained in:
parent
e4010d3eba
commit
6f99f14a6d
1 changed files with 17 additions and 12 deletions
|
@ -94,18 +94,23 @@ class SubprocessorBase(object):
|
||||||
cq = multiprocessing.Queue()
|
cq = multiprocessing.Queue()
|
||||||
|
|
||||||
client_dict.update ( {'print_lock' : self.print_lock} )
|
client_dict.update ( {'print_lock' : self.print_lock} )
|
||||||
|
try:
|
||||||
|
p = multiprocessing.Process(target=self.subprocess, args=(sq,cq,client_dict))
|
||||||
|
p.daemon = True
|
||||||
|
p.start()
|
||||||
|
self.processes.append ( { 'process' : p,
|
||||||
|
'sq' : sq,
|
||||||
|
'cq' : cq,
|
||||||
|
'state' : 'busy',
|
||||||
|
'sent_time': time.time(),
|
||||||
|
'name': name,
|
||||||
|
'host_dict' : host_dict
|
||||||
|
} )
|
||||||
|
except:
|
||||||
|
print ("Unable to start subprocess %s" % (name))
|
||||||
|
|
||||||
p = multiprocessing.Process(target=self.subprocess, args=(sq,cq,client_dict))
|
if len(self.processes) == 0:
|
||||||
p.daemon = True
|
raise Exception ("Unable to start Subprocessor '%s' " % (self.name))
|
||||||
p.start()
|
|
||||||
self.processes.append ( { 'process' : p,
|
|
||||||
'sq' : sq,
|
|
||||||
'cq' : cq,
|
|
||||||
'state' : 'busy',
|
|
||||||
'sent_time': time.time(),
|
|
||||||
'name': name,
|
|
||||||
'host_dict' : host_dict
|
|
||||||
} )
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
for p in self.processes[:]:
|
for p in self.processes[:]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue