mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-26 19:50:51 +00:00
Better exceptions safety in PipelineExecutor.
This commit is contained in:
parent
83a2242e2d
commit
fa5bc611ae
@ -144,14 +144,15 @@ void PipelineExecutor::addJob(UInt64 pid)
|
||||
{
|
||||
auto job = [this, pid]()
|
||||
{
|
||||
SCOPE_EXIT(event_counter.notify());
|
||||
|
||||
graph[pid].processor->work();
|
||||
|
||||
SCOPE_EXIT(
|
||||
{
|
||||
std::lock_guard lock(finished_execution_mutex);
|
||||
finished_execution_queue.push(pid);
|
||||
}
|
||||
event_counter.notify()
|
||||
);
|
||||
|
||||
graph[pid].processor->work();
|
||||
};
|
||||
|
||||
pool->schedule(createExceptionHandledJob(std::move(job), exception_handler));
|
||||
|
Loading…
Reference in New Issue
Block a user