thread/Thread: use BoundMethod

This commit is contained in:
Max Kellermann
2017-02-10 22:41:11 +01:00
parent 752ff12c37
commit 8649ea3d6f
18 changed files with 99 additions and 120 deletions

View File

@@ -54,10 +54,10 @@ ThreadInputStream::Start()
assert(p != nullptr);
buffer = new CircularBuffer<uint8_t>((uint8_t *)p, buffer_size);
thread.Start(ThreadFunc, this);
thread.Start();
}
inline void
void
ThreadInputStream::ThreadFunc()
{
FormatThreadName("input:%s", plugin);
@@ -107,13 +107,6 @@ ThreadInputStream::ThreadFunc()
Close();
}
void
ThreadInputStream::ThreadFunc(void *ctx)
{
ThreadInputStream &tis = *(ThreadInputStream *)ctx;
tis.ThreadFunc();
}
void
ThreadInputStream::Check()
{