mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
26 lines
326 B
C++
26 lines
326 B
C++
#include "Semaphore.h"
|
|
|
|
namespace cc {
|
|
|
|
Semaphore::Semaphore() noexcept
|
|
: mSemaphore(0)
|
|
{
|
|
}
|
|
|
|
Semaphore::Semaphore(uint32_t const initialCount) noexcept
|
|
: mSemaphore(initialCount)
|
|
{
|
|
}
|
|
|
|
void Semaphore::Wait() noexcept
|
|
{
|
|
mSemaphore.wait();
|
|
}
|
|
|
|
void Semaphore::Signal() noexcept
|
|
{
|
|
mSemaphore.signal();
|
|
}
|
|
|
|
} // namespace cc
|