- Fix qbar error for OSX.
This commit is contained in:
@@ -4,7 +4,7 @@ Take any normal serial but parallelizable for-loop and execute it in parallel us
|
||||
Don't worry about the technical details of using the multiprocessing module, race conditions, queues,
|
||||
parfor handles all that.
|
||||
|
||||
Tested on linux on python 2.7 and 3.8
|
||||
Tested on linux on python 2.7 and 3.8 and on Windows and OSX on python 3.8.
|
||||
|
||||
## Why is parfor better than just using multiprocessing?
|
||||
- Easy to use
|
||||
@@ -28,6 +28,8 @@ is because the individual processes cannot terminate. Importing javabridge (used
|
||||
java virtual machine can cause it to hang since the processes only terminate after the java vm has quit. In this case,
|
||||
pass terminator=javabridge.kill_vm to parfor.
|
||||
|
||||
On OSX the buffer bar does not work due to limitations of the OS.
|
||||
|
||||
## Arguments
|
||||
### Required:
|
||||
fun: function taking arguments: iteration from iterable, other arguments defined in args & kwargs
|
||||
|
||||
@@ -348,7 +348,10 @@ class parpool(object):
|
||||
|
||||
def _qbar_update(self):
|
||||
if not self.qbar is None:
|
||||
self.qbar.n = self.Qi.qsize()
|
||||
try:
|
||||
self.qbar.n = self.Qi.qsize()
|
||||
except:
|
||||
pass
|
||||
|
||||
def __setitem__(self, handle, n):
|
||||
""" Add new iteration. """
|
||||
|
||||
Reference in New Issue
Block a user