Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      C++ named requirements:SharedTimedLockable(since C++14)

      From cppreference.com
      <cpp‎ |named req
       
       
      C++ named requirements
       

      TheSharedTimedLockable requirements describe the characteristics of types that provide timed shared blocking semantics for execution agents (threads, processes, tasks).

      Contents

      [edit]Requirements

      For typeL to beSharedTimedLockable, given

      the following conditions have to be satisfied for an objectm of typeL:

      ExpressionRequiresReturn value
      m.try_lock_shared_for(rel_time)Blocks for the provided durationrel_time or until a lock onm is acquired.true if the lock was acquired,false otherwise.
      m.try_lock_shared_until(abs_time)Blocks until the provided time pointabs_time is reached or a lock onm is acquired.true if the lock was acquired,false otherwise.

      [edit]Notes

      Thetry_lock_shared_for andtry_lock_shared_until member functions obtain a shared lock onm on success.

      [edit]Standard library

      The following standard library types satisfySharedTimedLockable requirements:

      provides shared mutual exclusion facility and implements locking with a timeout
      (class)[edit]

      [edit]See also

      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/named_req/SharedTimedLockable&oldid=177787"

      [8]ページ先頭

      ©2009-2025 Movatter.jp