Files
botw/src/KingSystem/Utils/Thread/TaskQueueLock.cpp
T
Léo Lam 98f0c80f1d The task and thread families are plain ksys::
They link in the same block as the plain-ksys:: Message family.
getItemValue and applyScreenFade sit in engine UI TUs, hence ksys::ui.

(AI assisted using Claude Fable 5.1 and Claude Opus 5.5)
2026-10-06 03:19:39 +02:00

27 lines
471 B
C++

#include "KingSystem/Utils/Thread/TaskQueueLock.h"
#include "KingSystem/Utils/Thread/TaskQueueBase.h"
namespace ksys {
TaskQueueLock::TaskQueueLock() = default;
TaskQueueLock::~TaskQueueLock() {
unlock();
}
void TaskQueueLock::lock(TaskQueueBase* queue) {
if (!mQueue) {
mQueue = queue;
mQueue->lock();
}
}
void TaskQueueLock::unlock() {
if (mQueue) {
mQueue->unlock();
mQueue = nullptr;
}
}
} // namespace ksys