/*** Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: GroupState.cpp Date: 2021-11-1 Author: Reece ***/ #include #include "Async.hpp" #include "GroupState.hpp" namespace Aurora::Async { bool GroupState::Init() { this->cvWorkMutex = AuThreadPrimitives::ConditionMutexUnique(); if (!this->cvWorkMutex) { return false; } this->cvVariable = AuThreadPrimitives::ConditionVariableUnique(AuUnsafeRaiiToShared(this->cvWorkMutex)); if (!this->cvVariable) { return false; } this->eventLs = Loop::NewLSEvent(false, false, true); if (!this->eventLs) { return false; } return true; } }