|
|
@ -12,6 +12,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include "debug.h"
|
|
|
|
#include "debug.h"
|
|
|
|
#include "crashlog.h"
|
|
|
|
#include "crashlog.h"
|
|
|
|
|
|
|
|
#include "error_func.h"
|
|
|
|
#include <system_error>
|
|
|
|
#include <system_error>
|
|
|
|
#include <thread>
|
|
|
|
#include <thread>
|
|
|
|
#include <mutex>
|
|
|
|
#include <mutex>
|
|
|
@ -62,6 +63,8 @@ inline bool StartNewThread(std::thread *thr, const char *name, TFn&& _Fx, TArgs&
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
/* Call user function with the given arguments. */
|
|
|
|
/* Call user function with the given arguments. */
|
|
|
|
F(A...);
|
|
|
|
F(A...);
|
|
|
|
|
|
|
|
} catch (std::exception &e) {
|
|
|
|
|
|
|
|
FatalError("Unhandled exception in {} thread: {}", name, e.what());
|
|
|
|
} catch (...) {
|
|
|
|
} catch (...) {
|
|
|
|
NOT_REACHED();
|
|
|
|
NOT_REACHED();
|
|
|
|
}
|
|
|
|
}
|
|
|
|