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 'wifi_rate_zero' into 'master'
[simgrid.git]
/
include
/
simgrid
/
kernel
/
future.hpp
diff --git
a/include/simgrid/kernel/future.hpp
b/include/simgrid/kernel/future.hpp
index
ec2c7a4
..
ac6a448
100644
(file)
--- a/
include/simgrid/kernel/future.hpp
+++ b/
include/simgrid/kernel/future.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2016-202
1
. The SimGrid Team.
+/* Copyright (c) 2016-202
2
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-116,8
+116,7
@@
protected:
**/
void resolve()
{
**/
void resolve()
{
- if (status_ != FutureStatus::ready)
- xbt_die("Deadlock: this future is not ready");
+ xbt_assert(status_ == FutureStatus::ready, "Deadlock: this future is not ready");
status_ = FutureStatus::done;
if (exception_) {
std::exception_ptr exception = std::move(exception_);
status_ = FutureStatus::done;
if (exception_) {
std::exception_ptr exception = std::move(exception_);
@@
-279,7
+278,6
@@
class Future {
public:
Future() = default;
explicit Future(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
public:
Future() = default;
explicit Future(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
- ~Future() = default;
// Move type:
Future(Future&) = delete;
// Move type:
Future(Future&) = delete;
@@
-415,7
+413,7
@@
template <class T> Future<T> unwrap_future(Future<Future<T>> future)
* auto promise = std::make_shared<simgrid::kernel::Promise<T>>();
* auto future = promise->get_future();
*
* auto promise = std::make_shared<simgrid::kernel::Promise<T>>();
* auto future = promise->get_future();
*
- * simgrid::
simix
::Timer::set(date, [promise] {
+ * simgrid::
kernel::timer
::Timer::set(date, [promise] {
* try {
* int value = compute_the_value();
* if (value < 0)
* try {
* int value = compute_the_value();
* if (value < 0)