yangzhg commented on a change in pull request #8759:
URL: https://github.com/apache/incubator-doris/pull/8759#discussion_r841039561
##########
File path: be/src/util/threadpool.h
##########
@@ -331,24 +334,24 @@ class ThreadPool {
// A thread is added to the front of the list when it goes idle and is
// removed from the front and signaled when new work arrives. This
produces a
// LIFO usage pattern that is more efficient than idling on a single
- // ConditionVariable (which yields FIFO semantics).
//
// Protected by _lock.
struct IdleThread : public boost::intrusive::list_base_hook<> {
- explicit IdleThread(Mutex* m) : not_empty(m) {}
+ explicit IdleThread() {}
// Condition variable for "queue is not empty". Waiters wake up when a
new
// task is queued.
- ConditionVariable not_empty;
-
- DISALLOW_COPY_AND_ASSIGN(IdleThread);
+ std::condition_variable not_empty;
+ IdleThread(const IdleThread&) = delete;
+ void operator=(const IdleThread&) = delete;
};
boost::intrusive::list<IdleThread> _idle_threads; //
NOLINT(build/include_what_you_use)
// ExecutionMode::CONCURRENT token used by the pool for tokenless
submission.
std::unique_ptr<ThreadPoolToken> _tokenless;
- DISALLOW_COPY_AND_ASSIGN(ThreadPool);
Review comment:
DISALLOW_COPY_AND_ASSIGN may be conflict with brpc, and I will use bvar
in runtime profile in next pr
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]