/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/Foundation/Threading/Implementation/TaskSystemState.h
34 строки
1 KB
Jan Krassnigg
Migrate code to use Make* functions (#1022)
03 авг 2023, 08:07
Не верифицирован
03 авг 2023, 08:07
c42cf1d
Код
Авторство
О чём код?
#pragma once #include <Foundation/Threading/TaskSystem.h> class ezTaskSystemThreadState { private: friend class ezTaskSystem; friend class ezTaskWorkerThread; // The arrays of all the active worker threads. ezDynamicArray<ezTaskWorkerThread*> m_Workers[ezWorkerThreadType::ENUM_COUNT]; // the number of allocated (non-null) worker threads in m_Workers ezAtomicInteger32 m_iAllocatedWorkers[ezWorkerThreadType::ENUM_COUNT]; // the maximum number of worker threads that should be non-idle (and not blocked) at any time ezUInt32 m_uiMaxWorkersToUse[ezWorkerThreadType::ENUM_COUNT] = {}; }; class ezTaskSystemState { private: friend class ezTaskSystem; // The target frame time used by FinishFrameTasks() ezTime m_TargetFrameTime = ezTime::MakeFromSeconds(1.0 / 40.0); // => 25 ms // The deque can grow without relocating existing data, therefore the ezTaskGroupID's can store pointers directly to the data ezDeque<ezTaskGroup> m_TaskGroups; // The lists of all scheduled tasks, for each priority. ezList<ezTaskSystem::TaskData> m_Tasks[ezTaskPriority::ENUM_COUNT]; };