proxygen
|
#include <Semaphore.h>
Public Member Functions | |
Semaphore (size_t tokenCount) | |
Semaphore (const Semaphore &)=delete | |
Semaphore (Semaphore &&)=delete | |
Semaphore & | operator= (const Semaphore &)=delete |
Semaphore & | operator= (Semaphore &&)=delete |
void | signal () |
void | wait () |
size_t | getCapacity () const |
Private Member Functions | |
bool | waitSlow () |
bool | signalSlow () |
Private Attributes | |
size_t | capacity_ |
std::atomic< int64_t > | tokens_ |
folly::Synchronized< std::queue< folly::fibers::Baton * > > | waitList_ |
Definition at line 28 of file Semaphore.h.
|
inlineexplicit |
Definition at line 30 of file Semaphore.h.
References getCapacity(), operator=(), signal(), signalSlow(), wait(), and waitSlow().
|
delete |
|
delete |
size_t folly::fibers::Semaphore::getCapacity | ( | ) | const |
Referenced by Semaphore().
void folly::fibers::Semaphore::signal | ( | ) |
Definition at line 44 of file Semaphore.cpp.
References signalSlow(), and tokens_.
Referenced by Semaphore(), and TEST().
|
private |
Definition at line 21 of file Semaphore.cpp.
References tokens_, and waitList_.
Referenced by Semaphore(), and signal().
void folly::fibers::Semaphore::wait | ( | ) |
Definition at line 80 of file Semaphore.cpp.
References tokens_, and waitSlow().
Referenced by Semaphore(), and TEST().
|
private |
Definition at line 59 of file Semaphore.cpp.
References tokens_, folly::fibers::Baton::wait(), and waitList_.
Referenced by Semaphore(), and wait().
|
private |
Definition at line 54 of file Semaphore.h.
Referenced by getCapacity().
|
private |
Definition at line 56 of file Semaphore.h.
Referenced by signal(), signalSlow(), wait(), and waitSlow().
|
private |
Definition at line 57 of file Semaphore.h.
Referenced by signalSlow(), and waitSlow().