proxygen
folly::detail::LifoSemNode< Handoff, Atom > Struct Template Reference

#include <LifoSem.h>

Inheritance diagram for folly::detail::LifoSemNode< Handoff, Atom >:
folly::detail::LifoSemRawNode< Atom >

Public Member Functions

template<typename... Args>
void init (Args &&...args)
 
void destroy ()
 
Handoff & handoff ()
 
const Handoff & handoff () const
 
- Public Member Functions inherited from folly::detail::LifoSemRawNode< Atom >
bool isShutdownNotice () const
 
void clearShutdownNotice ()
 
void setShutdownNotice ()
 

Additional Inherited Members

- Public Types inherited from folly::detail::LifoSemRawNode< Atom >
typedef folly::IndexedMemPool< LifoSemRawNode< Atom >, 32, 200, AtomPool
 
- Static Public Member Functions inherited from folly::detail::LifoSemRawNode< Atom >
static Poolpool ()
 Storage for all of the waiter nodes for LifoSem-s that use Atom. More...
 
- Public Attributes inherited from folly::detail::LifoSemRawNode< Atom >
std::aligned_storage< sizeof(void *), alignof(void *)>::type raw
 
uint32_t next
 

Detailed Description

template<typename Handoff, template< typename > class Atom>
struct folly::detail::LifoSemNode< Handoff, Atom >

Handoff is a type not bigger than a void* that knows how to perform a single post() -> wait() communication. It must have a post() method. If it has a wait() method then LifoSemBase's wait() implementation will work out of the box, otherwise you will need to specialize LifoSemBase::wait accordingly.

Definition at line 166 of file LifoSem.h.

Member Function Documentation

template<typename Handoff, template< typename > class Atom>
void folly::detail::LifoSemNode< Handoff, Atom >::destroy ( )
inline

Definition at line 179 of file LifoSem.h.

Referenced by folly::detail::LifoSemNodeRecycler< Handoff, Atom >::operator()().

179  {
180  handoff().~Handoff();
181 #ifndef NDEBUG
182  memset(&this->raw, 'F', sizeof(this->raw));
183 #endif
184  }
std::aligned_storage< sizeof(void *), alignof(void *)>::type raw
Definition: LifoSem.h:124
template<typename Handoff, template< typename > class Atom>
Handoff& folly::detail::LifoSemNode< Handoff, Atom >::handoff ( )
inline

Definition at line 186 of file LifoSem.h.

186  {
187  return *static_cast<Handoff*>(static_cast<void*>(&this->raw));
188  }
std::aligned_storage< sizeof(void *), alignof(void *)>::type raw
Definition: LifoSem.h:124
template<typename Handoff, template< typename > class Atom>
const Handoff& folly::detail::LifoSemNode< Handoff, Atom >::handoff ( ) const
inline

Definition at line 190 of file LifoSem.h.

References Atom.

190  {
191  return *static_cast<const Handoff*>(static_cast<const void*>(&this->raw));
192  }
std::aligned_storage< sizeof(void *), alignof(void *)>::type raw
Definition: LifoSem.h:124
template<typename Handoff, template< typename > class Atom>
template<typename... Args>
void folly::detail::LifoSemNode< Handoff, Atom >::init ( Args &&...  args)
inline

Definition at line 175 of file LifoSem.h.

175  {
176  new (&this->raw) Handoff(std::forward<Args>(args)...);
177  }
std::aligned_storage< sizeof(void *), alignof(void *)>::type raw
Definition: LifoSem.h:124

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