From 45ccbbdcd5ac64d65214e76d42378080f93ed556 Mon Sep 17 00:00:00 2001 From: Kevin Huck Date: Fri, 29 Jun 2018 15:53:30 -0700 Subject: [PATCH] Adding two more static task wrappers to check for shutdown. --- src/apex/task_wrapper.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/apex/task_wrapper.hpp b/src/apex/task_wrapper.hpp index 7b2ae94b..cacee60c 100644 --- a/src/apex/task_wrapper.hpp +++ b/src/apex/task_wrapper.hpp @@ -49,6 +49,26 @@ struct task_wrapper { tt_ptr->task_id = task_identifier::get_task_id(apex_main_str); return tt_ptr; } + static inline std::shared_ptr & get_apex_hpx_shutdown_wrapper(void) { + static std::shared_ptr tt_ptr(nullptr); + if (tt_ptr.get() != nullptr) { + return tt_ptr; + } + const std::string apex_shutdown_str("shutdown_all_action"); + tt_ptr = std::make_shared(); + tt_ptr->task_id = task_identifier::get_task_id(apex_shutdown_str); + return tt_ptr; + } + static inline std::shared_ptr & get_apex_hpx_timer_wrapper(void) { + static std::shared_ptr tt_ptr(nullptr); + if (tt_ptr.get() != nullptr) { + return tt_ptr; + } + const std::string apex_timer_str("at_timer (expire at)"); + tt_ptr = std::make_shared(); + tt_ptr->task_id = task_identifier::get_task_id(apex_timer_str); + return tt_ptr; + } }; // struct task_wrapper }; // namespace apex