python Programming Glossary: q.put_nowait
Using Python's Multiprocessing module to execute simultaneous and separate SEAWAT/MODFLOW model runs http://stackoverflow.com/questions/9874042/using-pythons-multiprocessing-module-to-execute-simultaneous-and-separate-seawa q Queue for f in os.listdir wdir if f.endswith '.npy' q.put_nowait os.path.join wdir f ws # start threads threads Thread target.. # threads die if the program dies t.start for _ in threads q.put_nowait None # signal no more files for t in threads t.join # wait for.. q Queue for f in os.listdir wdir if f.endswith '.npy' q.put_nowait os.path.join wdir f ws # start threads threads Thread target..
|