Skip to content
Snippets Groups Projects
Commit 8ecef777 authored by Jeremie Deray's avatar Jeremie Deray
Browse files

multi-thread print also prints thread id

parent 5440f892
No related branches found
No related tags found
1 merge request!90[WIP] ProcessorBase multi-threading
...@@ -135,7 +135,8 @@ template <typename... Args> ...@@ -135,7 +135,8 @@ template <typename... Args>
inline void locked_cout(const CoutColor& color, const Args&... rest) inline void locked_cout(const CoutColor& color, const Args&... rest)
{ {
std::lock_guard<std::mutex> lock_cout{details::the_infamous_cout_mutex}; std::lock_guard<std::mutex> lock_cout{details::the_infamous_cout_mutex};
std::cout << color << details::printTime() << " "; std::cout << color << "[thread " << core::get_thread_id()
<< "]" << details::printTime() << " ";
details::cout_impl(rest...); details::cout_impl(rest...);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment