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
Removed the "state_ != finished" assert in s4u::Comm::wait(...) since
[simgrid.git]
/
src
/
s4u
/
s4u_comm.cpp
diff --git
a/src/s4u/s4u_comm.cpp
b/src/s4u/s4u_comm.cpp
index 070f7d1076bf03fab1f8ddbc22d04034fc02dca2..9f4ad0b438c1971bbc6b73e29406a97153701480 100644
(file)
--- a/
src/s4u/s4u_comm.cpp
+++ b/
src/s4u/s4u_comm.cpp
@@
-83,7
+83,10
@@
void Comm::start() {
state_ = started;
}
void Comm::wait() {
state_ = started;
}
void Comm::wait() {
- xbt_assert(state_ == started || state_ == inited);
+ xbt_assert(state_ == started || state_ == inited || state_ == finished);
+
+ if (state_ == finished)
+ return;
if (state_ == started)
simcall_comm_wait(pimpl_, -1/*timeout*/);
if (state_ == started)
simcall_comm_wait(pimpl_, -1/*timeout*/);
@@
-103,7
+106,10
@@
void Comm::wait() {
}
void Comm::wait(double timeout) {
}
void Comm::wait(double timeout) {
- xbt_assert(state_ == started || state_ == inited);
+ xbt_assert(state_ == started || state_ == inited || state_ == finished);
+
+ if (state_ == finished)
+ return;
if (state_ == started) {
simcall_comm_wait(pimpl_, timeout);
if (state_ == started) {
simcall_comm_wait(pimpl_, timeout);