mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
cellAudio updated, thread_t updated
This commit is contained in:
parent
42b748a881
commit
fd06f70387
19 changed files with 669 additions and 697 deletions
|
@ -54,18 +54,32 @@ public:
|
|||
virtual void Task() = 0;
|
||||
};
|
||||
|
||||
class thread
|
||||
class thread_t
|
||||
{
|
||||
enum thread_state_t
|
||||
{
|
||||
TS_NON_EXISTENT,
|
||||
TS_JOINABLE,
|
||||
};
|
||||
|
||||
std::atomic<thread_state_t> m_state;
|
||||
std::string m_name;
|
||||
std::thread m_thr;
|
||||
|
||||
public:
|
||||
thread(const std::string& name, std::function<void()> func);
|
||||
thread(const std::string& name);
|
||||
thread();
|
||||
thread_t(const std::string& name, std::function<void()> func);
|
||||
thread_t(const std::string& name);
|
||||
thread_t();
|
||||
~thread_t();
|
||||
|
||||
thread_t(const thread_t& right) = delete;
|
||||
thread_t(thread_t&& right) = delete;
|
||||
|
||||
thread_t& operator =(const thread_t& right) = delete;
|
||||
thread_t& operator =(thread_t&& right) = delete;
|
||||
|
||||
public:
|
||||
void set_name(const std::string& name);
|
||||
void start(std::function<void()> func);
|
||||
void detach();
|
||||
void join();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue