Commit 49f260a6 authored by Georgios Dagkakis's avatar Georgios Dagkakis

Broker, do not request operator if there is already an available one

parent b49e8af9
......@@ -122,10 +122,9 @@ class Broker(ObjectInterruption):
self.waitForOperator=True
self.victim.printTrace(self.victim.id, waitEvent='(resourceIsAvailable broker)')
if not self.victim.operatorPool.checkIfResourceIsAvailable():
self.expectedSignals['resourceAvailable']=1
yield self.resourceAvailable
transmitter, eventTime=self.resourceAvailable.value
self.resourceAvailable=self.env.event()
self.waitForOperator=False
......
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