19 from .
import Base, Logging
33 for module
in moduleList:
46 context = Base.getTestCaseContext()
48 fldRunning = context.field(
"%s.taskRunning" % (module))
49 fldFinished = context.field(
"%s.taskFinished" % (module))
51 if not (fldRunning
and fldFinished):
52 Logging.warning(
"Module %s has either no field taskFinished or no field taskRunning." % (module))
56 if not fldRunning.value:
59 Logging.info(
"Waiting for module %s to finish processing its background task." % (module))
62 fldListener = context.addFieldListener(fldFinished,
"Async.setFinished",
False)
64 mevis.MLAB.processEvents()
65 context.removeFieldListener(fldListener)
def waitForModules(moduleList)
Ask to wait for given modules to finish asynchronous processing.
def waitForModule(module)
Method to wait for the given module to finish its task.
def setFinished()
Set task to be finished.