From 37de97f2feedbe3d18b274df12f20b0a56ef0646 Mon Sep 17 00:00:00 2001 From: Kevin Huck Date: Tue, 3 Dec 2019 11:55:01 -0800 Subject: [PATCH] For packaged continuations, check to see if the function is annotated before creating the thread_description. --- hpx/lcos/local/packaged_continuation.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hpx/lcos/local/packaged_continuation.hpp b/hpx/lcos/local/packaged_continuation.hpp index 42e7040679f6..4c812a8a9373 100644 --- a/hpx/lcos/local/packaged_continuation.hpp +++ b/hpx/lcos/local/packaged_continuation.hpp @@ -376,8 +376,12 @@ namespace hpx { namespace lcos { namespace detail } hpx::intrusive_ptr this_(this); + const char * annotation = + traits::get_function_annotation::type>::call(f_); hpx::util::thread_description desc( - "hpx::parallel::execution::parallel_executor::post"); + annotation == nullptr ? + "hpx::parallel::execution::parallel_executor::post" : + annotation); parallel::execution::detail::post_policy_dispatch< hpx::launch::async_policy @@ -422,8 +426,12 @@ namespace hpx { namespace lcos { namespace detail } hpx::intrusive_ptr this_(this); + const char * annotation = + traits::get_function_annotation::type>::call(f_); hpx::util::thread_description desc( - "hpx::parallel::execution::parallel_executor::post"); + annotation == nullptr ? + "hpx::parallel::execution::parallel_executor::post" : + annotation); parallel::execution::detail::post_policy_dispatch< hpx::launch::async_policy