mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-25 19:20:52 +00:00
Attach tasks from PipelineExecutor to thread group.
This commit is contained in:
parent
0b8107c497
commit
caf9ed639b
@ -5,6 +5,7 @@
|
||||
#include <Processors/printPipeline.h>
|
||||
#include <Common/EventCounter.h>
|
||||
#include <ext/scope_guard.h>
|
||||
#include <Common/CurrentThread.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
@ -187,7 +188,9 @@ void PipelineExecutor::addJob(UInt64 pid)
|
||||
{
|
||||
if (pool)
|
||||
{
|
||||
auto job = [this, pid]()
|
||||
auto thread_group = CurrentThread::getGroup();
|
||||
|
||||
auto job = [this, pid, thread_group]()
|
||||
{
|
||||
SCOPE_EXIT(
|
||||
{
|
||||
@ -197,6 +200,9 @@ void PipelineExecutor::addJob(UInt64 pid)
|
||||
event_counter.notify()
|
||||
);
|
||||
|
||||
if (thread_group)
|
||||
CurrentThread::attachToIfDetached(thread_group);
|
||||
|
||||
executeJob(graph[pid].processor);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user