PYME.ParallelTasks.taskQueue module

class PYME.ParallelTasks.taskQueue.TaskQueue(name, initialTasks=[], onEmpty=<function doNix>, fTaskToPop=<function popZero>)

Methods

checkTimeouts()
cleanup()
fileResult(taskResult)
fileResults(taskResults)
getCompletedTask()
getNumberOpenTasks([exact])
getNumberTasksCompleted()
getNumberTasksInProgress()
getTask([workerN, NWorkers]) get task from front of list, blocks
getTasks([workerN, NWorkers])
postTask(task)
postTasks(tasks)
purge()
returnCompletedTask(taskResult)
returnCompletedTasks(taskResults)
setPopFcn(fcn) sets the function which determines which task to give a worker
checkTimeouts()
cleanup()
fileResult(taskResult)
fileResults(taskResults)
getCompletedTask()
getNumberOpenTasks(exact=True)
getNumberTasksCompleted()
getNumberTasksInProgress()
getTask(workerN=0, NWorkers=1)

get task from front of list, blocks

getTasks(workerN=0, NWorkers=1)
postTask(task)
postTasks(tasks)
purge()
returnCompletedTask(taskResult)
returnCompletedTasks(taskResults)
setPopFcn(fcn)

sets the function which determines which task to give a worker

class PYME.ParallelTasks.taskQueue.TaskQueueWithData(name, initialTasks=[], onEmpty=<function doNix>, fTaskToPop=<function popZero>)

Bases: PYME.ParallelTasks.taskQueue.TaskQueue

Methods

checkTimeouts()
cleanup()
fileResult(taskResult)
fileResults(taskResults)
getCompletedTask()
getNumberOpenTasks([exact])
getNumberTasksCompleted()
getNumberTasksInProgress()
getQueueData(fieldName, *args) Get data, defined by fieldName and potntially additional arguments, ascociated with queue
getTask([workerN, NWorkers]) get task from front of list, blocks
getTasks([workerN, NWorkers])
postTask(task)
postTasks(tasks)
purge()
returnCompletedTask(taskResult)
returnCompletedTasks(taskResults)
setPopFcn(fcn) sets the function which determines which task to give a worker
setQueueData(fieldName, value) Get data, defined by fieldName and potntially additional arguments, ascociated with queue
getQueueData(fieldName, *args)

Get data, defined by fieldName and potntially additional arguments, ascociated with queue

getTasks(workerN=0, NWorkers=1)
setQueueData(fieldName, value)

Get data, defined by fieldName and potntially additional arguments, ascociated with queue

PYME.ParallelTasks.taskQueue.doNix(taskQueue)
PYME.ParallelTasks.taskQueue.popZero(workerN, NWorkers, NTasks)