Thread: removed unused wait() with predicate.
It doesn't work this way anyway.
This commit is contained in:
@@ -231,21 +231,6 @@ public:
|
|||||||
_wait_for(-1, true);
|
_wait_for(-1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait until pred().
|
|
||||||
template <typename F, typename RT = std::invoke_result_t<F>>
|
|
||||||
static inline RT wait(F&& pred)
|
|
||||||
{
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
if (RT result = pred())
|
|
||||||
{
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
_wait_for(-1, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get current thread (may be nullptr)
|
// Get current thread (may be nullptr)
|
||||||
static thread_base* get_current()
|
static thread_base* get_current()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user