fixup: Code review comments

pull/36555/head
Eugene Ostroukhov 9 months ago
parent ff3fce35ff
commit d6f245cf69
  1. 8
      src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc
  2. 1
      src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h

@ -229,12 +229,6 @@ WorkStealingThreadPool::WorkStealingThreadPoolImpl::WorkStealingThreadPoolImpl(
size_t reserve_threads)
: reserve_threads_(reserve_threads), queue_(this) {}
WorkStealingThreadPool::WorkStealingThreadPoolImpl::
~WorkStealingThreadPoolImpl() {
grpc_core::MutexLock lock(&lifeguard_ptr_mu_);
lifeguard_.reset();
}
void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Start() {
for (size_t i = 0; i < reserve_threads_; i++) {
StartThread();
@ -245,7 +239,7 @@ void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Start() {
void WorkStealingThreadPool::WorkStealingThreadPoolImpl::Run(
EventEngine::Closure* closure) {
DCHECK(!IsQuiesced());
CHECK(!IsQuiesced());
if (g_local_queue != nullptr && g_local_queue->owner() == this) {
g_local_queue->Add(closure);
} else {

@ -105,7 +105,6 @@ class WorkStealingThreadPool final : public ThreadPool {
: public std::enable_shared_from_this<WorkStealingThreadPoolImpl> {
public:
explicit WorkStealingThreadPoolImpl(size_t reserve_threads);
~WorkStealingThreadPoolImpl();
// Start all threads.
void Start();
// Add a closure to a work queue, preferably a thread-local queue if

Loading…
Cancel
Save