Base Framework
|
#include <base/concurrency/Thread.h>
Public Member Functions | |
FixedResourceManager () noexcept | |
int | acquire () noexcept |
void | release (unsigned int id) noexcept |
Public Attributes | |
bool | slots [SIZE] |
unsigned int | availableSlots [SIZE] = {0} |
unsigned int | count = SIZE |
Manages fixed size resource. Not MT-safe.
|
inlinenoexcept |
Initializes manager.
|
inlinenoexcept |
Returns the next available slot. Returns -1 if none available.
|
inlinenoexcept |
Releases the given slot.