CHECK_EMU_STATUS, autojoin_thread_t

This commit is contained in:
Nekotekina 2015-07-04 02:22:24 +03:00
parent 8f9e1100c8
commit 3064cf8101
28 changed files with 145 additions and 179 deletions

View file

@ -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;