Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
33 lines
820 B
C++
33 lines
820 B
C++
#ifndef RAGNAROK_SOURCE_UTILITY_ASYNC_NASYNCWORKMGR_H
|
|
#define RAGNAROK_SOURCE_UTILITY_ASYNC_NASYNCWORKMGR_H
|
|
|
|
#include "Utility/Async/NAsyncWorkThread.h"
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
class NAsyncWorkMgr {
|
|
public:
|
|
explicit NAsyncWorkMgr(std::uint32_t workers);
|
|
virtual void Update(std::uint32_t maximum);
|
|
virtual ~NAsyncWorkMgr();
|
|
void Submit(NAsyncWorkPtr& work);
|
|
bool Start();
|
|
void Stop();
|
|
|
|
protected:
|
|
bool Initialize(std::uint32_t workers);
|
|
void DestroyQueues();
|
|
|
|
/* 0004 */ bool m_enabled;
|
|
/* 0008 */ std::uint32_t m_workerCount;
|
|
/* 000C */ NAsyncWorkRequestQueue* m_requests;
|
|
/* 0010 */ NAsyncWorkResponseQueue* m_responses;
|
|
/* 0014 */ std::vector<NAsyncWorkThread*> m_workers;
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(NAsyncWorkMgr) == 32);
|
|
#endif
|
|
|
|
#endif
|