mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
CHECK_EMU_STATUS, autojoin_thread_t
This commit is contained in:
parent
8f9e1100c8
commit
3064cf8101
28 changed files with 145 additions and 179 deletions
|
@ -84,6 +84,28 @@ public:
|
|||
bool is_current() const;
|
||||
};
|
||||
|
||||
class autojoin_thread_t final : private thread_t
|
||||
{
|
||||
public:
|
||||
using thread_t::mutex;
|
||||
using thread_t::cv;
|
||||
|
||||
public:
|
||||
autojoin_thread_t() = delete;
|
||||
|
||||
autojoin_thread_t(std::function<std::string()> name, std::function<void()> func)
|
||||
{
|
||||
start(std::move(name), std::move(func));
|
||||
}
|
||||
|
||||
virtual ~autojoin_thread_t() override
|
||||
{
|
||||
join();
|
||||
}
|
||||
|
||||
using thread_t::is_current;
|
||||
};
|
||||
|
||||
struct waiter_map_t
|
||||
{
|
||||
static const size_t size = 16;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue