proxygen
folly::SharedMutexImpl< ReaderPriority, Tag_, Atom, BlockImmediately, AnnotateForThreadSanitizer >::WaitUntilDeadline< Clock, Duration > Struct Template Reference

Public Member Functions

bool canBlock ()
 
bool canTimeOut ()
 
bool shouldTimeOut ()
 
bool doWait (Futex &futex, uint32_t expected, uint32_t waitMask)
 

Public Attributes

std::chrono::time_point< Clock, DurationabsDeadline_
 

Detailed Description

template<bool ReaderPriority, typename Tag_ = void, template< typename > class Atom = std::atomic, bool BlockImmediately = false, bool AnnotateForThreadSanitizer = kIsSanitizeThread && !ReaderPriority>
template<class Clock, class Duration>
struct folly::SharedMutexImpl< ReaderPriority, Tag_, Atom, BlockImmediately, AnnotateForThreadSanitizer >::WaitUntilDeadline< Clock, Duration >

Definition at line 652 of file SharedMutex.h.

Member Function Documentation

template<bool ReaderPriority, typename Tag_ = void, template< typename > class Atom = std::atomic, bool BlockImmediately = false, bool AnnotateForThreadSanitizer = kIsSanitizeThread && !ReaderPriority>
template<class Clock , class Duration >
bool folly::SharedMutexImpl< ReaderPriority, Tag_, Atom, BlockImmediately, AnnotateForThreadSanitizer >::WaitUntilDeadline< Clock, Duration >::canBlock ( )
inline

Definition at line 655 of file SharedMutex.h.

655  {
656  return true;
657  }
template<bool ReaderPriority, typename Tag_ = void, template< typename > class Atom = std::atomic, bool BlockImmediately = false, bool AnnotateForThreadSanitizer = kIsSanitizeThread && !ReaderPriority>
template<class Clock , class Duration >
bool folly::SharedMutexImpl< ReaderPriority, Tag_, Atom, BlockImmediately, AnnotateForThreadSanitizer >::WaitUntilDeadline< Clock, Duration >::canTimeOut ( )
inline

Definition at line 658 of file SharedMutex.h.

658  {
659  return true;
660  }
template<bool ReaderPriority, typename Tag_ = void, template< typename > class Atom = std::atomic, bool BlockImmediately = false, bool AnnotateForThreadSanitizer = kIsSanitizeThread && !ReaderPriority>
template<class Clock , class Duration >
bool folly::SharedMutexImpl< ReaderPriority, Tag_, Atom, BlockImmediately, AnnotateForThreadSanitizer >::WaitUntilDeadline< Clock, Duration >::doWait ( Futex futex,
uint32_t  expected,
uint32_t  waitMask 
)
inline

Definition at line 665 of file SharedMutex.h.

References folly::detail::futexWaitUntil(), and folly::detail::TIMEDOUT.

665  {
666  auto result =
667  detail::futexWaitUntil(&futex, expected, absDeadline_, waitMask);
668  return result != folly::detail::FutexResult::TIMEDOUT;
669  }
std::chrono::time_point< Clock, Duration > absDeadline_
Definition: SharedMutex.h:653
FutexResult futexWaitUntil(const Futex *futex, uint32_t expected, std::chrono::time_point< Clock, Duration > const &deadline, uint32_t waitMask)
Definition: Futex-inl.h:112
template<bool ReaderPriority, typename Tag_ = void, template< typename > class Atom = std::atomic, bool BlockImmediately = false, bool AnnotateForThreadSanitizer = kIsSanitizeThread && !ReaderPriority>
template<class Clock , class Duration >
bool folly::SharedMutexImpl< ReaderPriority, Tag_, Atom, BlockImmediately, AnnotateForThreadSanitizer >::WaitUntilDeadline< Clock, Duration >::shouldTimeOut ( )
inline

Definition at line 661 of file SharedMutex.h.

References now().

661  {
662  return Clock::now() > absDeadline_;
663  }
std::chrono::steady_clock::time_point now()
std::chrono::time_point< Clock, Duration > absDeadline_
Definition: SharedMutex.h:653

Member Data Documentation

template<bool ReaderPriority, typename Tag_ = void, template< typename > class Atom = std::atomic, bool BlockImmediately = false, bool AnnotateForThreadSanitizer = kIsSanitizeThread && !ReaderPriority>
template<class Clock , class Duration >
std::chrono::time_point<Clock, Duration> folly::SharedMutexImpl< ReaderPriority, Tag_, Atom, BlockImmediately, AnnotateForThreadSanitizer >::WaitUntilDeadline< Clock, Duration >::absDeadline_

Definition at line 653 of file SharedMutex.h.


The documentation for this struct was generated from the following file: