Skip to content

Commit

Permalink
fix ugly error message and update git submodules in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
marekkokot committed Jan 18, 2024
1 parent 14a914b commit a2f3560
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
all: kmc kmc_dump kmc_tools py_kmc_api

dummy := $(shell git submodule update --init --recursive)

UNAME_S := $(shell uname -s)
UNAME_M := $(shell uname -m)
UNAME_P := $(shell uname -p)
Expand Down
16 changes: 14 additions & 2 deletions kmc_core/kmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1802,14 +1802,26 @@ template <unsigned SIZE> KMC::Stage2Results CKMC<SIZE>::ProcessStage2_impl()

template <unsigned SIZE> KMC::Stage1Results CKMC<SIZE>::ProcessStage1()
{
auto res = ProcessStage1_impl();
KMC::Stage1Results res;
//run on separate exception aware thread for proper exception handling
CExceptionAwareThread th([&res, this] {
res = this->ProcessStage1_impl();
});
th.join();

CThreadExceptionCollector::Inst().RethrowIfAnyException();
return res;
}

template <unsigned SIZE> KMC::Stage2Results CKMC<SIZE>::ProcessStage2()
{
auto res = ProcessStage2_impl();
KMC::Stage2Results res;
//run on separate exception aware thread for proper exception handling if exception thrown in main thread
CExceptionAwareThread th([&res, this] {
res = this->ProcessStage2_impl();
});
th.join();

CThreadExceptionCollector::Inst().RethrowIfAnyException();
return res;
}
Expand Down

0 comments on commit a2f3560

Please sign in to comment.