当前位置: 首页>>代码示例>>C++>>正文


C++ lcos::promise类代码示例

本文整理汇总了C++中lcos::promise的典型用法代码示例。如果您正苦于以下问题:C++ promise类的具体用法?C++ promise怎么用?C++ promise使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了promise类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: simple_refcnt_monitor

 /// 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());
 }
开发者ID:7ev3n,项目名称:hpx,代码行数:10,代码来源:simple_refcnt_checker.hpp

示例2: is_ready

    bool is_ready()
    {
        // Flush pending reference counting operations on the target locality.
        agas::garbage_collect(locality_);

        return flag_.is_ready();
    }
开发者ID:zcourts,项目名称:hpx,代码行数:7,代码来源:simple_refcnt_checker.hpp

示例3: simple_refcnt_monitor

 /// 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());
 }
开发者ID:zcourts,项目名称:hpx,代码行数:8,代码来源:simple_refcnt_checker.hpp

示例4: managed_refcnt_monitor

 /// 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());
 }
开发者ID:adk9,项目名称:hpx,代码行数:8,代码来源:managed_refcnt_checker.hpp

示例5: managed_refcnt_monitor

 /// 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());
 }
开发者ID:Bcorde5,项目名称:hpx,代码行数:9,代码来源:managed_refcnt_checker.hpp


注:本文中的lcos::promise类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。