thread/Thread: use BoundMethod

This commit is contained in:
Max Kellermann
2017-02-10 22:41:11 +01:00
parent 5ba5bc8ba1
commit 781487c4dd
19 changed files with 94 additions and 124 deletions

View File

@@ -26,7 +26,7 @@ EventThread::Start()
{
assert(!thread.IsDefined());
thread.Start(ThreadFunc, this);
thread.Start();
}
void
@@ -39,17 +39,9 @@ EventThread::Stop()
}
void
EventThread::ThreadFunc()
EventThread::Run()
{
SetThreadName("io");
event_loop.Run();
};
void
EventThread::ThreadFunc(void *arg)
{
auto &et = *(EventThread *)arg;
et.ThreadFunc();
};
}