Machine now first sets the flag waitToDispose (first releases entity) and the releases the operator

parent cbb2c047
......@@ -364,13 +364,6 @@ class Machine(CoreObject):
self.outputTrace(self.getActiveObjectQueue()[0].name,"ended processing in "+self.objName)
except IndexError:
pass
# =============== release resource after the end of processing
if (self.operatorPool!='None')\
and any(type=="Processing" for type in self.multOperationTypeList)\
and not interruption:
self.releaseOperator()
yield waituntil,self,self.broker.brokerIsSet
# set the variable that flags an Entity is ready to be disposed
self.waitToDispose=True
......@@ -388,6 +381,15 @@ class Machine(CoreObject):
self.nameLastEntityEnded=self.currentEntity.name # this holds the name of the last entity that ended processing in Machine
self.completedJobs+=1 # Machine completed one more Job
# =============== release resource after the end of processing
if (self.operatorPool!='None')\
and any(type=="Processing" for type in self.multOperationTypeList)\
and not interruption:
self.releaseOperator()
yield waituntil,self,self.broker.brokerIsSet
while 1:
# wait until the next Object is available or machine has failure
yield waituntil, self, self.ifCanDisposeOrHaveFailure
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment