Commit b5661200 authored by Georgios Dagkakis's avatar Georgios Dagkakis

Queue and Source to use any_of

parent 1d4fc3c6
...@@ -105,7 +105,7 @@ class Queue(CoreObject): ...@@ -105,7 +105,7 @@ class Queue(CoreObject):
self.expectedSignals['canDispose']=1 self.expectedSignals['canDispose']=1
self.expectedSignals['isRequested']=1 self.expectedSignals['isRequested']=1
self.expectedSignals['loadOperatorAvailable']=1 self.expectedSignals['loadOperatorAvailable']=1
receivedEvent=yield self.isRequested | self.canDispose | self.loadOperatorAvailable receivedEvent=yield self.env.any_of([self.isRequested, self.canDispose, self.loadOperatorAvailable])
self.printTrace(self.id, received='') self.printTrace(self.id, received='')
# if the event that activated the thread is isRequested then getEntity # if the event that activated the thread is isRequested then getEntity
if self.isRequested in receivedEvent: if self.isRequested in receivedEvent:
......
...@@ -143,7 +143,7 @@ class Source(CoreObject): ...@@ -143,7 +143,7 @@ class Source(CoreObject):
self.expectedSignals['canDispose']=1 self.expectedSignals['canDispose']=1
self.expectedSignals['entityCreated']=1 self.expectedSignals['entityCreated']=1
self.expectedSignals['loadOperatorAvailable']=1 self.expectedSignals['loadOperatorAvailable']=1
receivedEvent=yield self.entityCreated | self.canDispose | self.loadOperatorAvailable receivedEvent=yield self.env.any_of([self.entityCreated, self.canDispose, self.loadOperatorAvailable])
self.printTrace(self.id, received='') self.printTrace(self.id, received='')
# if an entity is created try to signal the receiver and continue # if an entity is created try to signal the receiver and continue
if self.entityCreated in receivedEvent: if self.entityCreated in receivedEvent:
......
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