Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::experimental::latch

      From cppreference.com
      <cpp‎ |experimental
      Merged into ISO C++ The functionality described on this page was merged into the mainline ISO C++ standard as of 7/2019; seestd::latch(since C++20)
       
       
       
       
       
      Defined in header<experimental/latch>
      class latch;
      (concurrency TS)

      Thelatch class is a downward counter of typeptrdiff_t which can beused to synchronize threads. The value of the counter is initialized on creation.Threads may block on the latch until the counter is decremented to zero. There isno possibility to increase or reset the counter, which makes the latch a single-usebarrier.

      Unlikestd::experimental::barrier,std::experimental::latch can be decremented by a participating thread more than once.

      [edit]Member functions

      constructs alatch
      (public member function)[edit]
      destroys the latch
      (public member function)[edit]
      operator=
      [deleted]
      not copy-assignable
      (public member function)[edit]
      decrements the counter by1 and blocks until it reaches zero
      (public member function)[edit]
      decrements the counter in a non-blocking manner
      (public member function)[edit]
      tests if the internal counter equals zero
      (public member function)[edit]
      blocks until the counter reaches zero
      (public member function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/experimental/latch&oldid=164137"

      [8]ページ先頭

      ©2009-2025 Movatter.jp