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

BatchDecomposition updated to work with the entityRemoved event

parent f34f5389
...@@ -126,8 +126,9 @@ class BatchDecomposition(CoreObject): ...@@ -126,8 +126,9 @@ 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
self.waitEntityRemoval=False
break 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
...@@ -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