Ejemplo n.º 1
0
 static lcos::future<Result> service_async(
     std::string const& key
   , request const& req
   , threads::thread_priority priority = threads::thread_priority_default
     )
 {
     return service_async<Result>(symbol_namespace_locality(key), req, priority);
 }
Ejemplo n.º 2
0
 bool symbol_namespace::bind(std::string key, naming::gid_type gid)
 {
     naming::id_type dest = symbol_namespace_locality(key);
     if (naming::get_locality_from_gid(dest.get_gid()) == hpx::get_locality())
     {
         return server_->bind(std::move(key), std::move(gid));
     }
     server::symbol_namespace::bind_action action;
     return action(std::move(dest), std::move(key), std::move(gid));
 }
Ejemplo n.º 3
0
 hpx::future<bool> symbol_namespace::bind_async(std::string key, naming::gid_type gid)
 {
     naming::id_type dest = symbol_namespace_locality(key);
     if (naming::get_locality_from_gid(dest.get_gid()) == hpx::get_locality())
     {
         return hpx::make_ready_future(server_->bind(std::move(key), std::move(gid)));
     }
     server::symbol_namespace::bind_action action;
     return hpx::async(action, std::move(dest), std::move(key), std::move(gid));
 }
Ejemplo n.º 4
0
 hpx::future<bool> symbol_namespace::on_event(
     std::string const& name
   , bool call_for_past_events
   , hpx::id_type lco
     )
 {
     naming::id_type dest = symbol_namespace_locality(name);
     if (naming::get_locality_from_gid(dest.get_gid()) == hpx::get_locality())
     {
         return hpx::make_ready_future(
             server_->on_event(name, call_for_past_events, std::move(lco)));
     }
     server::symbol_namespace::on_event_action action;
     return hpx::async(
         action, std::move(dest), name, call_for_past_events, std::move(lco));
 }
Ejemplo n.º 5
0
    hpx::future<naming::id_type> symbol_namespace::unbind_async(std::string key)
    {
        naming::id_type dest = symbol_namespace_locality(key);
        if (naming::get_locality_from_gid(dest.get_gid()) == hpx::get_locality())
        {
            naming::gid_type raw_gid = server_->unbind(std::move(key));

            if (naming::detail::has_credits(raw_gid))
                return hpx::make_ready_future(
                    naming::id_type(raw_gid, naming::id_type::managed));

            return hpx::make_ready_future(
                naming::id_type(raw_gid, naming::id_type::unmanaged));
        }
        server::symbol_namespace::unbind_action action;
        return hpx::async(action, std::move(dest), std::move(key));
    }