#pragma once class CPUThread; enum CPUThreadType : unsigned char; class CPUThreadManager { std::mutex m_mutex; std::vector> m_threads; std::array, 5> m_raw_spu; public: CPUThreadManager(); ~CPUThreadManager(); void Close(); std::shared_ptr AddThread(CPUThreadType type); void RemoveThread(u32 id); std::vector> GetThreads() { std::lock_guard lock(m_mutex); return m_threads; } std::shared_ptr GetThread(u32 id); std::shared_ptr GetThread(u32 id, CPUThreadType type); std::shared_ptr GetRawSPUThread(u32 index); void Exec(); void Task(); };