Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::experimental::shared_future

      From cppreference.com
      <cpp‎ |experimental
       
       
       
       
       
      template<class T>class shared_future;
      (1)(concurrency TS)
      template<class T>class shared_future<T&>;
      (2)(concurrency TS)
      template<>          class shared_future<void>;
      (3)(concurrency TS)

      The class templatestd::experimental::shared_future extendsstd::shared_future with the following operations:

      • anunwrapping constructor fromfuture<shared_future<T>>;
      • a member functionis_ready to query whether the associated shared state is ready; and
      • a member functionthen to attach a continuation to the future.

      There is no interoperation betweenstd::experimental::shared_future andstd::shared_future.

      Contents

      [edit]Member functions

      constructs ashared_future
      (public member function)[edit]
      checks if the shared state is ready
      (public member function)[edit]
      attaches a continuation to ashared_future
      (public member function)[edit]
      assigns the contents
      (public member function)

      Members identical to std::shared_future

      Member functions

      destructs the future object
      (public member function ofstd::shared_future<T>)
      Getting the result
      returns the result
      (public member function ofstd::shared_future<T>)[edit]
      State
      checks if the future has a shared state
      (public member function ofstd::shared_future<T>)[edit]
      waits for the result to become available
      (public member function ofstd::shared_future<T>)[edit]
      waits for the result, returns if it is not available for the specified timeout duration
      (public member function ofstd::shared_future<T>)[edit]
      waits for the result, returns if it is not available until specified time point has been reached
      (public member function ofstd::shared_future<T>)[edit]

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      (concurrency TS)
      a version ofstd::future enhanced with continuations and other features
      (class template)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/experimental/shared_future&oldid=164515"

      [8]ページ先頭

      ©2009-2025 Movatter.jp