Skip to content

Commit

Permalink
Add function annotations to future continuations
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Jul 18, 2017
1 parent 1f65158 commit 0f54870
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions hpx/lcos/detail/future_data.hpp
Expand Up @@ -230,11 +230,18 @@ namespace detail
return;
}

f1_();
f2_();
{
hpx::util::annotate_function annotate(f1_);
(void)annotate;
f1_();
}
{
hpx::util::annotate_function annotate(f2_);
(void)annotate;
f2_();
}
}

private:
F1 f1_;
F2 f2_;
};
Expand Down Expand Up @@ -1149,13 +1156,29 @@ namespace detail
};
}}}

namespace hpx { namespace traits { namespace detail
namespace hpx { namespace traits
{
template <typename R, typename Allocator>
struct shared_state_allocator<lcos::detail::future_data<R>, Allocator>
namespace detail
{
typedef lcos::detail::future_data_allocator<R, Allocator> type;
template <typename R, typename Allocator>
struct shared_state_allocator<lcos::detail::future_data<R>, Allocator>
{
typedef lcos::detail::future_data_allocator<R, Allocator> type;
};
}

#if defined(HPX_HAVE_THREAD_DESCRIPTION)
///////////////////////////////////////////////////////////////////////////
template <typename F1, typename F2>
struct get_function_annotation<lcos::detail::compose_cb_impl<F1, F2> >
{
static char const*
call(lcos::detail::compose_cb_impl<F1, F2> const& f) noexcept
{
return get_function_annotation<F1>::call(f.f1_);
}
};
}}}
#endif
}}

#endif

0 comments on commit 0f54870

Please sign in to comment.