Job flow WIP.

This commit is contained in:
XMRig 2017-06-11 06:52:23 +03:00
parent bcef4b12ec
commit 3ad11685cc
14 changed files with 126 additions and 25 deletions

View file

@ -97,12 +97,12 @@ void Console::message(Console::Level level, const char* fmt, ...)
m_colors ? kCL_N : ""
);
uv_mutex_lock(&m_mutex);
pthread_mutex_lock(&m_mutex);
vfprintf(stdout, buf, ap);
fflush(stdout);
uv_mutex_unlock(&m_mutex);
pthread_mutex_unlock(&m_mutex);
va_end(ap);
}
@ -121,12 +121,12 @@ void Console::text(const char* fmt, ...)
m_colors ? kCL_N : ""
);
uv_mutex_lock(&m_mutex);
pthread_mutex_lock(&m_mutex);
vfprintf(stdout, buf, ap);
fflush(stdout);
uv_mutex_unlock(&m_mutex);
pthread_mutex_unlock(&m_mutex);
va_end(ap);
}
@ -135,5 +135,5 @@ void Console::text(const char* fmt, ...)
Console::Console() :
m_colors(true)
{
uv_mutex_init(&m_mutex);
pthread_mutex_init(&m_mutex, nullptr);
}