Beispiel #1
0
 /// Create a new component on the target locality.
 explicit simple_refcnt_monitor(naming::id_type const& locality)
   : base_type()
   , flag_promise_()
   , flag_(flag_promise_.get_future())
   , locality_(naming::get_locality_from_id(locality))
 {
     static_cast<base_type&>(*this) =
         stub_type::create_async(locality_, flag_promise_.get_id());
 }
Beispiel #2
0
    bool is_ready()
    {
        // Flush pending reference counting operations on the target locality.
        agas::garbage_collect(locality_);

        return flag_.is_ready();
    }
Beispiel #3
0
 /// Create a new component on the target locality.
 explicit simple_refcnt_monitor(
     naming::id_type const& locality
     )
   : locality_(naming::get_locality_from_id(locality))
 {
     gid_ = stub_type::create_async(locality_, flag_.get_id());
 }
Beispiel #4
0
 /// Create a new component on the target locality.
 explicit managed_refcnt_monitor(
     naming::id_type const& locality
     )
   : locality_(naming::get_locality_from_id(locality))
 {
     this->base_type::create(locality_, flag_.get_gid());
 }
Beispiel #5
0
 /// Create a new component on the target locality.
 explicit managed_refcnt_monitor(
     naming::gid_type const& locality
     )
   : locality_(naming::get_locality_from_gid(locality)
             , naming::id_type::unmanaged)
 {
     gid_ = stub_type::create_async(locality_, flag_.get_id());
 }
Beispiel #6
0
    bool is_ready(
        Duration const& d
        )
    {
        // Flush pending reference counting operations on the target locality.
        agas::garbage_collect(locality_);

        // Schedule a wakeup.
        threads::set_thread_state(threads::get_self_id(), d, threads::pending);

        // Suspend this pxthread.
        threads::get_self().yield(threads::suspended);

        return flag_.is_ready();
    }