Merge pull request #44308 from ZhiguoZh/20221216-threadpool-notify

Call std::condition_variable::notify_* without lock in ThreadPool
This commit is contained in:
Sergei Trifonov 2022-12-27 15:02:49 +01:00 committed by GitHub
commit 56b3c6c68f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,9 +156,10 @@ ReturnType ThreadPoolImpl<Thread>::scheduleImpl(Job job, ssize_t priority, std::
propagate_opentelemetry_tracing_context ? DB::OpenTelemetry::CurrentContext() : DB::OpenTelemetry::TracingContextOnThread());
++scheduled_jobs;
new_job_or_shutdown.notify_one();
}
new_job_or_shutdown.notify_one();
return static_cast<ReturnType>(true);
}