Merge branch 'v0.20.x'

This commit is contained in:
Max Kellermann
2018-03-15 20:07:11 +01:00
9 changed files with 50 additions and 14 deletions

View File

@@ -37,8 +37,12 @@ ThreadInputStream::ThreadInputStream(const char *_plugin,
allocation.ForkCow(false);
}
ThreadInputStream::~ThreadInputStream() noexcept
void
ThreadInputStream::Stop() noexcept
{
if (!thread.IsDefined())
return;
{
const std::lock_guard<Mutex> lock(mutex);
close = true;
@@ -69,7 +73,7 @@ ThreadInputStream::ThreadFunc() noexcept
Open();
} catch (...) {
postponed_exception = std::current_exception();
cond.broadcast();
SetReady();
return;
}