summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
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/commentscan.l
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/commentscan.l')
-rw-r--r--src/commentscan.l12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index a1dd0e1..d695f0a 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -409,11 +409,9 @@ struct commentscanYY_state
};
-#if MULTITHREADED_INPUT
static std::mutex g_sectionMutex;
static std::mutex g_formulaMutex;
static std::mutex g_citeMutex;
-#endif
//-----------------------------------------------------------------------------
@@ -2822,9 +2820,7 @@ static void addXRefItem(yyscan_t yyscanner,
if (listName==0) return;
//printf("addXRefItem(%s,%s,%s,%d)\n",listName,itemTitle,listTitle,append);
-#if MULTITHREADED_INPUT
std::unique_lock<std::mutex> lock(g_sectionMutex);
-#endif
RefList *refList = RefListManager::instance().add(listName,listTitle,itemTitle);
RefItem *item = 0;
@@ -2898,9 +2894,7 @@ static void addXRefItem(yyscan_t yyscanner,
// not already added. Returns the label of the formula.
static QCString addFormula(yyscan_t yyscanner)
{
-#if MULTITHREADED_INPUT
std::unique_lock<std::mutex> lock(g_formulaMutex);
-#endif
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString formLabel;
QCString fText=yyextra->formulaText.simplifyWhiteSpace();
@@ -2922,9 +2916,7 @@ static SectionType sectionLevelToType(int level)
static void addSection(yyscan_t yyscanner)
{
-#if MULTITHREADED_INPUT
std::unique_lock<std::mutex> lock(g_sectionMutex);
-#endif
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
SectionManager &sm = SectionManager::instance();
const SectionInfo *si = sm.find(yyextra->sectionLabel);
@@ -2957,9 +2949,7 @@ static void addSection(yyscan_t yyscanner)
static void addCite(yyscan_t yyscanner)
{
-#if MULTITHREADED_INPUT
std::unique_lock<std::mutex> lock(g_citeMutex);
-#endif
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString name=yytext;
if (yytext[0] =='"')
@@ -3127,9 +3117,7 @@ static inline void setOutput(yyscan_t yyscanner,OutputContext ctx)
static void addAnchor(yyscan_t yyscanner,const char *anchor)
{
-#if MULTITHREADED_INPUT
std::unique_lock<std::mutex> lock(g_sectionMutex);
-#endif
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
SectionManager &sm = SectionManager::instance();
const SectionInfo *si = sm.find(anchor);