Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
victimsnino committed May 22, 2023
1 parent 4bdb7b2 commit b044936
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rpp/rpp/schedulers/new_thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ class new_thread
}

private:
static void data_thread(std::atomic_flag& is_disposed,
std::unique_lock<std::recursive_mutex> lock,
static void data_thread(std::unique_lock<std::recursive_mutex> lock,

std::atomic_flag& is_disposed,
std::condition_variable_any& cv,
details::schedulables_queue*& queue_ptr)
{
Expand Down Expand Up @@ -107,7 +108,7 @@ class new_thread
std::condition_variable_any m_cv{};
std::atomic_flag m_is_disposed{};

std::thread m_thread{data_thread, m_is_disposed, std::unique_lock{m_queue_mutex}, m_cv, m_queue_ptr};
std::thread m_thread{&data_thread, std::unique_lock{m_queue_mutex}, std::ref(m_is_disposed), std::ref(m_cv), std::ref(m_queue_ptr)};
};

public:
Expand Down

0 comments on commit b044936

Please sign in to comment.