update
This commit is contained in:
@@ -21,7 +21,9 @@ from multiprocessing import Queue, Process
|
||||
import queue
|
||||
from decimal import Decimal, getcontext
|
||||
|
||||
DELAY1 = 80
|
||||
import time
|
||||
|
||||
DELAY1 = 20
|
||||
DELAY2 = 20
|
||||
|
||||
class Example(Frame):
|
||||
@@ -116,7 +118,8 @@ class Example(Frame):
|
||||
print (self.p1.is_alive())
|
||||
|
||||
queue.put(pi)
|
||||
print("end")
|
||||
print("end")
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -53,13 +53,13 @@ def sourcedir_foldercnt(sourcedir):
|
||||
#print(len(folderlist))
|
||||
return cnt
|
||||
|
||||
def process_files(source, dest):
|
||||
def process_files(gui, source, dest):
|
||||
global sourcedir
|
||||
global destdir
|
||||
sourcedir = source
|
||||
destdir = dest
|
||||
pool = mp.Pool(processes=num_cores)
|
||||
pool.map(process_file, filelist)
|
||||
pool.map(process_file, filelist, gui)
|
||||
|
||||
def process_file(data):
|
||||
outfile = ''
|
||||
@@ -106,7 +106,7 @@ def process_file(data):
|
||||
newfile = open(outputfile, "w")
|
||||
newfile.write(outfile)
|
||||
newfile.close()
|
||||
|
||||
|
||||
def async_process(num):
|
||||
pool = mp.Pool(processes=num)
|
||||
pool.map(process_file, filelist)
|
||||
Reference in New Issue
Block a user