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
b5661200
Commit
b5661200
authored
Sep 09, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Queue and Source to use any_of
parent
1d4fc3c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
dream/simulation/Queue.py
dream/simulation/Queue.py
+1
-1
dream/simulation/Source.py
dream/simulation/Source.py
+1
-1
No files found.
dream/simulation/Queue.py
View file @
b5661200
...
...
@@ -105,7 +105,7 @@ class Queue(CoreObject):
self
.
expectedSignals
[
'canDispose'
]
=
1
self
.
expectedSignals
[
'isRequested'
]
=
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
=
''
)
# if the event that activated the thread is isRequested then getEntity
if
self
.
isRequested
in
receivedEvent
:
...
...
dream/simulation/Source.py
View file @
b5661200
...
...
@@ -143,7 +143,7 @@ class Source(CoreObject):
self
.
expectedSignals
[
'canDispose'
]
=
1
self
.
expectedSignals
[
'entityCreated'
]
=
1
self
.
expectedSignals
[
'loadOperatorAvailable'
]
=
1
receivedEvent
=
yield
self
.
en
tityCreated
|
self
.
canDispose
|
self
.
loadOperatorAvailable
receivedEvent
=
yield
self
.
en
v
.
any_of
([
self
.
entityCreated
,
self
.
canDispose
,
self
.
loadOperatorAvailable
])
self
.
printTrace
(
self
.
id
,
received
=
''
)
# if an entity is created try to signal the receiver and continue
if
self
.
entityCreated
in
receivedEvent
:
...
...
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