Go to the documentation of this file.
15 #ifndef ABSL_SYNCHRONIZATION_INTERNAL_THREAD_POOL_H_
16 #define ABSL_SYNCHRONIZATION_INTERNAL_THREAD_POOL_H_
25 #include "absl/base/thread_annotations.h"
26 #include "absl/synchronization/mutex.h"
30 namespace synchronization_internal {
58 assert(
func !=
nullptr);
65 return !queue_.empty();
77 if (
func ==
nullptr) {
93 #endif // ABSL_SYNCHRONIZATION_INTERNAL_THREAD_POOL_H_
bool WorkAvailable() const ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_)
void Await(const Condition &cond)
#define ABSL_NAMESPACE_END
#define ABSL_NAMESPACE_BEGIN
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
#define ABSL_EXCLUSIVE_LOCKS_REQUIRED(...)
std::vector< std::thread > threads_
static volatile int num_threads
ThreadPool(int num_threads)
std::queue< std::function< void()> > queue_ ABSL_GUARDED_BY(mu_)
ThreadPool & operator=(const ThreadPool &)=delete
static uv_thread_t thread
void Schedule(std::function< void()> func)
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:36