Exemplo n.º 1
0
 naming::id_type get_gid() const
 {
     return
         naming::id_type(
             naming::strip_credit_from_gid(get_base_gid())
           , naming::id_type::unmanaged
         );
 }
Exemplo n.º 2
0
        naming::id_type get_gid() const
        {
            // all credits should have been taken already
            naming::gid_type gid = get_base_gid();
            HPX_ASSERT(!naming::detail::has_credits(gid));

            // any (subsequent) invocation causes the credits to be replenished
            naming::detail::replenish_credits(gid);
            return naming::id_type(gid, naming::id_type::managed);
        }
Exemplo n.º 3
0
managed_refcnt_checker::~managed_refcnt_checker()
{
    const boost::uint32_t prefix_ = get_locality_id();
    const naming::gid_type this_ = get_base_gid();

    std::ostringstream strm;

    if (!references_.empty())
    {
        strm << ( boost::format("[%1%/%2%]: held references\n")
                  % prefix_ % this_);

        for (naming::id_type const& ref : references_)
        {
            strm << "  " << ref << " "
                 << naming::get_management_type_name(ref.get_management_type())
                 << "\n";
        }

        // Flush garbage collection.
        references_.clear();
        agas::garbage_collect();
    }

    if (naming::invalid_id != target_)
    {
        strm << ( boost::format("[%1%/%2%]: destroying object\n")
                  % prefix_ % this_);

        strm << ( boost::format("[%1%/%2%]: triggering flag %3%\n")
                  % prefix_ % this_ % target_);

        hpx::trigger_lco_event(target_);
    }

    std::string const str = strm.str();

    if (!str.empty())
        cout << str << flush;
}
Exemplo n.º 4
0
 naming::id_type get_gid() const
 {
     return naming::id_type(get_base_gid(), naming::id_type::unmanaged);
 }