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

@@ -44,8 +44,8 @@ ThreadInputStream::~ThreadInputStream()
}
}
InputStream *
ThreadInputStream::Start(Error &error)
void
ThreadInputStream::Start()
{
assert(buffer == nullptr);
@@ -53,11 +53,7 @@ ThreadInputStream::Start(Error &error)
assert(p != nullptr);
buffer = new CircularBuffer<uint8_t>((uint8_t *)p, buffer_size);
if (!thread.Start(ThreadFunc, this, error))
return nullptr;
return this;
thread.Start(ThreadFunc, this);
}
inline void