X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8729da7ae2c4f5c7713c7d912c3e159227b2383b..6f8347f58430e00fabef8e6cbbf3fb94e6b8a49d:/src/plugins/task.cpp diff --git a/src/plugins/task.cpp b/src/plugins/task.cpp index a2337dc343..835b307144 100644 --- a/src/plugins/task.cpp +++ b/src/plugins/task.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -142,7 +143,7 @@ void Task::set_amount(double amount) * @brief Set the token to send to successors. * @note The token is passed to each successor after the task end, i.e., after the on_end callback. */ -void Task::set_token(std::shared_ptr token) +void Task::set_token(std::shared_ptr token) { simgrid::kernel::actor::simcall_answered([this, token] { token_ = token; }); } @@ -151,9 +152,9 @@ void Task::set_token(std::shared_ptr token) * @return Map of tokens received for the next execution. * @note If there is no queued execution for this task the map might not exist or be partially empty. */ -std::map> Task::get_next_execution_tokens() const +std::shared_ptr Task::get_next_token_from(TaskPtr t) { - return tokens_received_.front(); + return tokens_received_.front()[t]; } /** @ingroup plugin_task