mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-16 10:03:41 -07:00
_
This commit is contained in:
parent
7f609d0f0a
commit
98d3657cbc
1 changed files with 6 additions and 1 deletions
|
@ -366,7 +366,11 @@ class InteractBase(object):
|
|||
sq.put (True)
|
||||
except:
|
||||
sq.put (False)
|
||||
|
||||
sq.close()
|
||||
sq = None
|
||||
import gc
|
||||
gc.collect()
|
||||
|
||||
def input_in_time (self, str, max_time_sec):
|
||||
sq = multiprocessing.Queue()
|
||||
p = multiprocessing.Process(target=self.input_process, args=( sys.stdin.fileno(), sq, str))
|
||||
|
@ -381,6 +385,7 @@ class InteractBase(object):
|
|||
if time.time() - t > max_time_sec:
|
||||
break
|
||||
p.terminate()
|
||||
p.join()
|
||||
sq.close()
|
||||
old_stdin = sys.stdin
|
||||
sys.stdin = os.fdopen( os.dup(sys.stdin.fileno()) )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue