def test():
    machine = JobMachine()
    jobs = []
    
    #first round
    for i in range(10):
        job = IlastikJob(testFunction, ["Processing task ",str(i)])
        jobs.append(job)

    results = machine.process(jobs)
    print "finished:"
    
    for r in results:
        print r

    GLOBAL_WM.setThreadCount(0) #set unthreaded mode
    
    #second round
    for i in range(10):
        job = IlastikJob(testFunction, ["#2 Processing task ",str(i)])
        jobs.append(job)

    results = machine.process(jobs)
    print "finished:"
    
    for r in results:
        print r

#*******************************************************************************
# i f   _ _ n a m e _ _   = =   " _ _ m a i n _ _ "                            *
#*******************************************************************************
simple JobMachine test and usage example
dataset/ETHPy150Open ilastik/ilastik-0.5/ilastik/core/jobMachine.py/test