Skip to content

Commit

Permalink
Added extra diagnostic in System.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenhein committed Aug 20, 2018
1 parent a4ca6fb commit 1708bec
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ int System::RunThreadsPPLIMPL()
(* CallbackDuplList[runCat])(* bop, uniques, crossrefs);

static atomic<int> thrIdNext = 0;
bool err = false;
bool err = false, err2 = false;

threadMgr.Reset(numThreads);

Expand All @@ -590,14 +590,19 @@ int System::RunThreadsPPLIMPL()
(* CallbackSingleList[runCat])(realThrId, bno);

if (! threadMgr.Release(thrId))
err = true;
err2 = true;
});

if (err)
{
cout << "Too many threads, numThreads " << numThreads << endl;
return RETURN_THREAD_INDEX;
}
else if (err2)
{
cout << "Release failed, numThreads " << numThreads << endl;
return RETURN_THREAD_INDEX;
}

(* CallbackCopyList[runCat])(crossrefs);
#endif
Expand Down

0 comments on commit 1708bec

Please sign in to comment.