本文整理汇总了C++中naming::id_type::make_unmanaged方法的典型用法代码示例。如果您正苦于以下问题:C++ id_type::make_unmanaged方法的具体用法?C++ id_type::make_unmanaged怎么用?C++ id_type::make_unmanaged使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类naming::id_type
的用法示例。
在下文中一共展示了id_type::make_unmanaged方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: migrate_to_here
naming::gid_type component_storage::migrate_to_here(
std::vector<char> const& data, naming::id_type id,
naming::address const& current_lva)
{
naming::gid_type gid(naming::detail::get_stripped_gid(id.get_gid()));
data_[gid] = data;
// rebind the object to this storage locality
naming::address addr(current_lva);
addr.address_ = 0; // invalidate lva
if (!agas::bind(launch::sync, gid, addr, this->gid_))
{
std::ostringstream strm;
strm << "failed to rebind id " << id
<< "to storage locality: " << gid_;
HPX_THROW_EXCEPTION(duplicate_component_address,
"component_storage::migrate_to_here",
strm.str());
return naming::invalid_gid;
}
id.make_unmanaged(); // we can now release the object
return naming::invalid_gid;
}
示例2: trigger_lco_event
void trigger_lco_event(naming::id_type const& id, naming::address && addr,
naming::id_type const& cont, bool move_credits)
{
typedef lcos::base_lco::set_event_action set_action;
typedef
hpx::traits::extract_action<set_action>::local_result_type
local_result_type;
typedef
hpx::traits::extract_action<set_action>::remote_result_type
remote_result_type;
if (move_credits &&
id.get_management_type() != naming::id_type::unmanaged)
{
naming::id_type target(id.get_gid(), id_type::managed_move_credit);
id.make_unmanaged();
detail::apply_impl<set_action>(
actions::typed_continuation<
local_result_type, remote_result_type>(cont),
target, std::move(addr), actions::action_priority<set_action>());
}
else
{
detail::apply_impl<set_action>(
actions::typed_continuation<
local_result_type, remote_result_type>(cont),
id, std::move(addr), actions::action_priority<set_action>());
}
}
示例3: set_lco_error
void set_lco_error(naming::id_type const& id, boost::exception_ptr const& e)
{
naming::id_type target(id.get_gid(), id_type::managed_move_credit);
id.make_unmanaged();
lcos::base_lco::set_exception_action set;
apply(set, target, e);
}
示例4: trigger_lco_event
void trigger_lco_event(naming::id_type const& id, naming::id_type const& cont)
{
naming::id_type target(id.get_gid(), id_type::managed_move_credit);
id.make_unmanaged();
lcos::base_lco::set_event_action set;
apply_c(set, cont, target);
}
示例5: set_lco_error
void set_lco_error(naming::id_type const& id, naming::address && addr,
std::exception_ptr const& e, bool move_credits)
{
typedef lcos::base_lco::set_exception_action set_action;
if (move_credits &&
id.get_management_type() != naming::id_type::unmanaged)
{
naming::id_type target(id.get_gid(), id_type::managed_move_credit);
id.make_unmanaged();
detail::apply_impl<set_action>(
target, std::move(addr), actions::action_priority<set_action>(), e);
}
else
{
detail::apply_impl<set_action>(
id, std::move(addr), actions::action_priority<set_action>(), e);
}
}