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
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git]
/
include
/
simgrid
/
simix
/
blocking_simcall.hpp
diff --git
a/include/simgrid/simix/blocking_simcall.hpp
b/include/simgrid/simix/blocking_simcall.hpp
index
2e26f0a
..
f7f233c
100644
(file)
--- a/
include/simgrid/simix/blocking_simcall.hpp
+++ b/
include/simgrid/simix/blocking_simcall.hpp
@@
-113,8
+113,10
@@
public:
}
void wait()
{
}
void wait()
{
- if (!valid())
- throw std::future_error(std::future_errc::no_state);
+ // The future is ready! We don't have to wait:
+ if (this->is_ready())
+ return;
+ // The future is not ready. We have to delegate to the SimGrid kernel:
std::exception_ptr exception;
smx_process_t self = SIMIX_process_self();
simcall_run_blocking([this, &exception, self]{
std::exception_ptr exception;
smx_process_t self = SIMIX_process_self();
simcall_run_blocking([this, &exception, self]{