atomic.hpp: add atomic_t<bool> specialization

May be required in future, plus adds/hides some methods.
This commit is contained in:
Nekotekina 2020-12-06 16:32:56 +03:00
parent eb66302907
commit 24e4e329ed
6 changed files with 96 additions and 6 deletions

View file

@ -40,7 +40,7 @@ namespace gl
{
for (auto&& job : m_work_queue.pop_all())
{
if (m_context_ready.compare_and_swap_test(false, true))
if (!m_context_ready.test_and_set())
{
// Bind context on first use
m_context_bind_func(m_context);