19 #ifndef GRPCPP_IMPL_CODEGEN_SYNC_H
20 #define GRPCPP_IMPL_CODEGEN_SYNC_H
24 #ifdef GPR_HAS_PTHREAD_H
62 #ifdef GPR_HAS_PTHREAD_H
63 pthread_mutex_t do_not_use_pth_;
115 bool released_ =
false;
137 template <
typename Predicate>
virtual void gpr_cv_init(gpr_cv *cv)=0
virtual int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline)=0
virtual void gpr_mu_destroy(gpr_mu *mu)=0
virtual void gpr_mu_unlock(gpr_mu *mu)=0
virtual void gpr_mu_init(gpr_mu *mu)=0
virtual void gpr_cv_destroy(gpr_cv *cv)=0
virtual gpr_timespec gpr_inf_future(gpr_clock_type type)=0
virtual void gpr_cv_signal(gpr_cv *cv)=0
virtual void gpr_mu_lock(gpr_mu *mu)=0
virtual void gpr_cv_broadcast(gpr_cv *cv)=0
void Signal()
Definition: sync.h:126
void Broadcast()
Definition: sync.h:127
CondVar()
Definition: sync.h:120
CondVar(const CondVar &)=delete
CondVar & operator=(const CondVar &)=delete
int Wait(Mutex *mu)
Definition: sync.h:129
int Wait(Mutex *mu, const gpr_timespec &deadline)
Definition: sync.h:133
~CondVar()
Definition: sync.h:121
void WaitUntil(Mutex *mu, Predicate pred)
Definition: sync.h:138
std::mutex do_not_use_sth_
Definition: sync.h:61
const gpr_mu * get() const
Definition: sync.h:56
Mutex()
Definition: sync.h:49
Mutex & operator=(const Mutex &)=delete
gpr_mu mu_
Definition: sync.h:60
gpr_mu * get()
Definition: sync.h:55
Mutex(const Mutex &)=delete
~Mutex()
Definition: sync.h:50
MutexLock(const MutexLock &)=delete
MutexLock(gpr_mu *mu)
Definition: sync.h:74
MutexLock & operator=(const MutexLock &)=delete
MutexLock(Mutex *mu)
Definition: sync.h:71
~MutexLock()
Definition: sync.h:77
~ReleasableMutexLock()
Definition: sync.h:94
ReleasableMutexLock(Mutex *mu)
Definition: sync.h:88
ReleasableMutexLock(const ReleasableMutexLock &)=delete
void Unlock()
Definition: sync.h:107
void Lock()
Definition: sync.h:101
ReleasableMutexLock(gpr_mu *mu)
Definition: sync.h:91
ReleasableMutexLock & operator=(const ReleasableMutexLock &)=delete
@ GPR_CLOCK_REALTIME
Realtime clock.
Definition: gpr_types.h:36
#define GPR_DEBUG_ASSERT(x)
Definition: log.h:103
pthread_cond_t gpr_cv
Definition: sync_posix.h:46
This header provides an object that reads bytes directly from a grpc::ByteBuffer, via the ZeroCopyInp...
Definition: alarm.h:24
CoreCodegenInterface * g_core_codegen_interface
Definition: completion_queue_impl.h:90
Definition: sync_windows.h:26
Analogous to struct timespec.
Definition: gpr_types.h:47