Fix issue when re-using the main-thread and terminating the scheduler
Test
run_tests
^
app/benchmark_unbalanced/CMakeFiles/benchmark_unbalanced.dir/build.make:62: recipe for target 'app/benchmark_unbalanced/CMakeFiles/benchmark_unbalanced.dir/main.cpp.o' failed
make[2]: *** [app/benchmark_unbalanced/CMakeFiles/benchmark_unbalanced.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:411: recipe for target 'app/benchmark_unbalanced/CMakeFiles/benchmark_unbalanced.dir/all' failed
make[1]: *** [app/benchmark_unbalanced/CMakeFiles/benchmark_unbalanced.dir/all] Error 2
make: *** [all] Error 2
Makefile:140: recipe for target 'all' failed
./ci_scripts/run_tests.sh: line 9: ./bin/tests: No such file or directory
ERROR: Job failed: exit code 1