sys_lv2dbg added, bugfix

This commit is contained in:
Nekotekina 2015-07-09 18:30:37 +03:00
parent daa93a7226
commit 4bacfcf847
46 changed files with 1484 additions and 1205 deletions

View file

@ -1330,11 +1330,13 @@ void thread_t::detach()
// +clear m_thread
const auto ctrl = std::move(m_thread);
// notify if detached by another thread
if (g_tls_this_thread != m_thread.get())
{
// lock for reliable notification
std::lock_guard<std::mutex> lock(mutex);
cv.notify_all();
cv.notify_one();
}
ctrl->m_thread.detach();
@ -1359,7 +1361,7 @@ void thread_t::join()
// lock for reliable notification
std::lock_guard<std::mutex> lock(mutex);
cv.notify_all();
cv.notify_one();
}
ctrl->m_thread.join();