/*** 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" #include 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 = AuLoop::NewLSAsync(); if (!this->eventLs) { return false; } this->asyncLoopSourceShared = this->eventLs; return true; } }