libs/full/runtime_distributed/src/runtime_distributed.cpp
naming::id_type find_locality(
        components::component_type type, error_code& ec)
    {
        if (nullptr == hpx::applier::get_applier_ptr())
        {
            HPX_THROWS_IF(ec, invalid_status, "hpx::find_locality",
                "the runtime system is not available at this time");
            return naming::invalid_id;
        }

        std::vector<naming::id_type> locality_ids;
        hpx::applier::get_applier().get_localities(locality_ids, type, ec);

        if (ec || locality_ids.empty())
            return naming::invalid_id;

        // chose first locality to host the object
        return locality_ids.front();
    }
// find a locality supporting the given component
find a locality supporting the given component
find a locality supporting the given component
naming::id_type find_locality(
        components::component_type type, error_code& ec)
    {
        if (nullptr == hpx::applier::get_applier_ptr())
        {
            HPX_THROWS_IF(ec, invalid_status, "hpx::find_locality",
                "the runtime system is not available at this time");
            return naming::invalid_id;
        }
        std::vector<naming::id_type> locality_ids;
        hpx::applier::get_applier().get_localities(locality_ids, type, ec);
        if (ec || locality_ids.empty())
            return naming::invalid_id;
        return locality_ids.front();
    }
naming :: id_type find_locality ( components :: component_type type , error_code & ec ) { if ( nullptr == hpx :: applier :: get_applier_ptr ( ) ) { HPX_THROWS_IF ( ec , invalid_status , " " , " " ) ; return naming :: invalid_id ; } std :: vector < naming :: id_type > locality_ids ; hpx :: applier :: get_applier ( ) . get_localities ( locality_ids , type , ec ) ; if ( ec || locality_ids . empty ( ) ) return naming :: invalid_id ; return locality_ids . front ( ) ; }
find a locality supporting the given component
find a locality supporting the given component
// chose first locality to host the object