summaryrefslogtreecommitdiffstats
path: root/src/message.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-08-05 11:20:36 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-08-05 11:20:36 (GMT)
commit5a2e70a9cde99f6a065d78ad550ed386cdcc83f1 (patch)
tree60f38e90309411c8413ce3160da9c3725a862cca /src/message.cpp
parent73380fc18508d4f98d61c9929ad786220f320da5 (diff)
downloadDoxygen-5a2e70a9cde99f6a065d78ad550ed386cdcc83f1.zip
Doxygen-5a2e70a9cde99f6a065d78ad550ed386cdcc83f1.tar.gz
Doxygen-5a2e70a9cde99f6a065d78ad550ed386cdcc83f1.tar.bz2
New option allowing processing using multiple threads
Introduces new option NUM_PROC_THREADS. It specifies the number threads doxygen is allowed to use during processing. When set to 0 doxygen will based this on the number of cores available in the system. You can set it explicitly to a value larger than 0 to get more control over the balance between CPU load and processing speed. At this moment only the input processing can be done using multiple threads. I plan to extend this with more parallel processing in the future. Since this is still an experimental feature the default is set to 1, which efficively disables parallel processing. Please report any issues you encounter that appear when changing the default. Note that generating dot graphs in parallel is still controlled separately by the DOT_NUM_THREADS setting.
Diffstat (limited to 'src/message.cpp')
-rw-r--r--src/message.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/message.cpp b/src/message.cpp
index 96c54a1..37204f5 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -35,9 +35,7 @@ static const char *error_str = "error: ";
static FILE *warnFile = stderr;
-#if MULTITHREADED_INPUT
static std::mutex g_mutex;
-#endif
void initWarningFormat()
{
@@ -112,9 +110,7 @@ void msg(const char *fmt, ...)
{
if (!Config_getBool(QUIET))
{
-#if MULTITHREADED_INPUT
std::unique_lock<std::mutex> lock(g_mutex);
-#endif
if (Debug::isFlagSet(Debug::Time))
{
printf("%.3f sec: ",((double)Debug::elapsedTime()));
@@ -155,9 +151,7 @@ static void format_warn(const char *file,int line,const char *text)
msgText += '\n';
{
-#if MULTITHREADED_INPUT
std::unique_lock<std::mutex> lock(g_mutex);
-#endif
// print resulting message
fwrite(msgText.data(),1,msgText.length(),warnFile);
}
@@ -257,9 +251,7 @@ extern void err_full(const char *file,int line,const char *fmt, ...)
void term(const char *fmt, ...)
{
{
-#if MULTITHREADED_INPUT
std::unique_lock<std::mutex> lock(g_mutex);
-#endif
va_list args;
va_start(args, fmt);
vfprintf(warnFile, (QCString(error_str) + fmt).data(), args);
@@ -284,9 +276,7 @@ void printlex(int dbg, bool enter, const char *lexName, const char *fileName)
enter_txt_uc = "Finished";
}
-#if MULTITHREADED_INPUT
std::unique_lock<std::mutex> lock(g_mutex);
-#endif
if (dbg)
{
if (fileName)