Skip to content

Commit

Permalink
Adding two more static task wrappers to check for shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Jun 29, 2018
1 parent d555ebc commit 45ccbbd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/apex/task_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<task_wrapper> & get_apex_hpx_shutdown_wrapper(void) {
static std::shared_ptr<task_wrapper> 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<task_wrapper>();
tt_ptr->task_id = task_identifier::get_task_id(apex_shutdown_str);
return tt_ptr;
}
static inline std::shared_ptr<task_wrapper> & get_apex_hpx_timer_wrapper(void) {
static std::shared_ptr<task_wrapper> 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<task_wrapper>();
tt_ptr->task_id = task_identifier::get_task_id(apex_timer_str);
return tt_ptr;
}
}; // struct task_wrapper

}; // namespace apex

0 comments on commit 45ccbbd

Please sign in to comment.