thread/Thread: throw std::system_error on error

This commit is contained in:
Max Kellermann
2016-06-17 19:06:30 +02:00
parent fea3f6cc72
commit d3c7fac606
11 changed files with 21 additions and 53 deletions

View File

@@ -24,8 +24,6 @@
#include "thread/Thread.hxx"
#include "thread/Name.hxx"
#include "event/Loop.hxx"
#include "system/FatalError.hxx"
#include "util/Error.hxx"
#include <assert.h>
@@ -75,10 +73,7 @@ io_thread_start()
assert(!io.thread.IsDefined());
const ScopeLock protect(io.mutex);
Error error;
if (!io.thread.Start(io_thread_func, nullptr, error))
FatalError(error);
io.thread.Start(io_thread_func, nullptr);
}
void