Skip to content

Commit

Permalink
Attempt to fix problem in managed_component_base
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Jun 1, 2017
1 parent ac340b2 commit fb6da29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions hpx/runtime/components/server/managed_component_base.hpp
Expand Up @@ -295,9 +295,10 @@ namespace hpx { namespace components
static heap_type& get_heap()
{
// ensure thread-safe initialization
util::reinitializable_static<
heap_type, wrapper_heap_tag
> heap(components::get_component_type<Component>());
static components::component_type t =
components::get_component_type<Component>();

util::reinitializable_static<heap_type, wrapper_heap_tag> heap(t);
return heap.get();
}

Expand Down
4 changes: 3 additions & 1 deletion hpx/runtime/components/server/memory_block.hpp
Expand Up @@ -567,9 +567,11 @@ namespace hpx { namespace components { namespace server
static heap_type& get_heap()
{
// ensure thread-safe initialization
static component_type t = component_memory_block;

util::reinitializable_static<
heap_type, wrapper_heap_tag, HPX_RUNTIME_INSTANCE_LIMIT
> heap(component_memory_block);
> heap(t);
return heap.get(get_runtime_instance_number());
}

Expand Down

0 comments on commit fb6da29

Please sign in to comment.