Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
49f260a6
Commit
49f260a6
authored
Mar 05, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Broker, do not request operator if there is already an available one
parent
b49e8af9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
dream/simulation/OperatedPoolBroker.py
dream/simulation/OperatedPoolBroker.py
+7
-8
No files found.
dream/simulation/OperatedPoolBroker.py
View file @
49f260a6
...
@@ -120,15 +120,14 @@ class Broker(ObjectInterruption):
...
@@ -120,15 +120,14 @@ class Broker(ObjectInterruption):
# XXX discuss this
# XXX discuss this
elif
G
.
RouterList
[
0
].
invoked
and
G
.
RouterList
[
0
].
allocation
and
not
self
.
victim
.
currentOperator
:
elif
G
.
RouterList
[
0
].
invoked
and
G
.
RouterList
[
0
].
allocation
and
not
self
.
victim
.
currentOperator
:
self
.
waitForOperator
=
True
self
.
waitForOperator
=
True
self
.
victim
.
printTrace
(
self
.
victim
.
id
,
waitEvent
=
'(resourceIsAvailable broker)'
)
self
.
victim
.
printTrace
(
self
.
victim
.
id
,
waitEvent
=
'(resourceIsAvailable broker)'
)
self
.
expectedSignals
[
'resourceAvailable'
]
=
1
if
not
self
.
victim
.
operatorPool
.
checkIfResourceIsAvailable
():
self
.
expectedSignals
[
'resourceAvailable'
]
=
1
yield
self
.
resourceAvailable
yield
self
.
resourceAvailable
transmitter
,
eventTime
=
self
.
resourceAvailable
.
value
transmitter
,
eventTime
=
self
.
resourceAvailable
.
value
self
.
resourceAvailable
=
self
.
env
.
event
()
self
.
resourceAvailable
=
self
.
env
.
event
()
self
.
waitForOperator
=
False
self
.
waitForOperator
=
False
#===============================================================
#===============================================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment