A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Implement a second veto on start. Activity must be assigned to a resource
[simgrid.git]
/
src
/
s4u
/
s4u_Io.cpp
diff --git
a/src/s4u/s4u_Io.cpp
b/src/s4u/s4u_Io.cpp
index
c88ccc7
..
dd45f7a
100644
(file)
--- a/
src/s4u/s4u_Io.cpp
+++ b/
src/s4u/s4u_Io.cpp
@@
-72,7
+72,12
@@
Io* Io::wait_for(double timeout)
IoPtr Io::set_disk(sg_disk_t disk)
{
disk_ = disk;
- return this;
+
+ // Setting the disk may allow to start the activity, let's try
+ if (state_ == State::STARTING)
+ vetoable_start();
+
+ return this;
}
IoPtr Io::set_size(sg_size_t size)