Commit 66448bed authored by Georgios Dagkakis's avatar Georgios Dagkakis

BatchDecomposition updated to work with the entityRemoved event

parent f34f5389
...@@ -126,9 +126,10 @@ class BatchDecomposition(CoreObject): ...@@ -126,9 +126,10 @@ class BatchDecomposition(CoreObject):
self.canDispose=self.env.event() self.canDispose=self.env.event()
# signal the receiver again and break # signal the receiver again and break
if self.signalReceiver(): if self.signalReceiver():
break self.waitEntityRemoval=True
if self.entityRemoved.triggered: yield self.entityRemoved
break self.waitEntityRemoval=False
break
# for the consecutive times wait till the receiver is available and then signalReceiver # for the consecutive times wait till the receiver is available and then signalReceiver
# we know that the receiver is occupied with the previous sub-batch # we know that the receiver is occupied with the previous sub-batch
...@@ -138,9 +139,11 @@ class BatchDecomposition(CoreObject): ...@@ -138,9 +139,11 @@ class BatchDecomposition(CoreObject):
self.canDispose=self.env.event() self.canDispose=self.env.event()
signaling=self.signalReceiver() signaling=self.signalReceiver()
if signaling: if signaling:
self.waitEntityRemoval=True
yield self.entityRemoved
self.waitEntityRemoval=False
break break
if self.entityRemoved.triggered:
break
self.entityRemoved=self.env.event() self.entityRemoved=self.env.event()
# ======================================================================= # =======================================================================
......
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