![]() |
FireSTARR
|
Provides the ability to limit number of threads running at once. More...
#include <Model.h>
Public Member Functions | |
Semaphore (const int n) | |
Create a Semaphore that limits number of concurrent things running. | |
Semaphore (const Semaphore &rhs)=delete | |
Semaphore (Semaphore &&rhs)=delete | |
Semaphore & | operator= (const Semaphore &rhs)=delete |
Semaphore & | operator= (Semaphore &&rhs)=delete |
void | set_limit (size_t limit) |
size_t | limit () |
void | notify () |
Notify something that's waiting so it can run. | |
void | wait () |
Wait until allowed to run. | |
Provides the ability to limit number of threads running at once.
|
inlineexplicit |
Create a Semaphore that limits number of concurrent things running.
n | Number of concurrent things running |