#pragma once #include #include #include "object/process.h" #include "object/semaphore.h" #include "object/thread.h" class ProcessCleanup { public: ProcessCleanup() {} void CleanupLoop(); void CleanupProcess(glcr::RefPtr process); void CleanupThread(glcr::RefPtr thread); private: Semaphore semaphore_; glcr::LinkedList> thread_list_; glcr::LinkedList> process_list_; }; void CleanupThreadEntry(ProcessCleanup* cleanup);