Go to the documentation of this file.
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>
151 #endif // GRPCPP_IMPL_CODEGEN_SYNC_H
virtual void gpr_mu_unlock(gpr_mu *mu)=0
void Signal()
Definition: sync.h:126
ReleasableMutexLock(Mutex *mu)
Definition: sync.h:88
This header provides an object that reads bytes directly from a grpc::ByteBuffer, via the ZeroCopyInp...
Definition: alarm.h:24
CondVar & operator=(const CondVar &)=delete
virtual void gpr_mu_destroy(gpr_mu *mu)=0
int Wait(Mutex *mu)
Definition: sync.h:129
pthread_cond_t gpr_cv
Definition: sync_posix.h:46
virtual void gpr_cv_signal(gpr_cv *cv)=0
MutexLock(gpr_mu *mu)
Definition: sync.h:74
int Wait(Mutex *mu, const gpr_timespec &deadline)
Definition: sync.h:133
CondVar()
Definition: sync.h:120
virtual gpr_timespec gpr_inf_future(gpr_clock_type type)=0
void Unlock()
Definition: sync.h:107
MutexLock & operator=(const MutexLock &)=delete
~Mutex()
Definition: sync.h:50
virtual void gpr_mu_init(gpr_mu *mu)=0
const gpr_mu * get() const
Definition: sync.h:56
virtual void gpr_cv_init(gpr_cv *cv)=0
Mutex & operator=(const Mutex &)=delete
#define GPR_DEBUG_ASSERT(x)
Definition: log.h:103
gpr_mu mu_
Definition: sync.h:60
virtual int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline)=0
void Broadcast()
Definition: sync.h:127
~MutexLock()
Definition: sync.h:77
~ReleasableMutexLock()
Definition: sync.h:94
void WaitUntil(Mutex *mu, Predicate pred)
Definition: sync.h:138
~CondVar()
Definition: sync.h:121
virtual void gpr_mu_lock(gpr_mu *mu)=0
virtual void gpr_cv_destroy(gpr_cv *cv)=0
CoreCodegenInterface * g_core_codegen_interface
Definition: completion_queue_impl.h:93
Definition: sync_windows.h:26
Analogous to struct timespec.
Definition: gpr_types.h:47
ReleasableMutexLock(gpr_mu *mu)
Definition: sync.h:91
std::mutex do_not_use_sth_
Definition: sync.h:61
ReleasableMutexLock & operator=(const ReleasableMutexLock &)=delete
Mutex()
Definition: sync.h:49
Realtime clock.
Definition: gpr_types.h:36
virtual void gpr_cv_broadcast(gpr_cv *cv)=0
MutexLock(Mutex *mu)
Definition: sync.h:71
gpr_mu * get()
Definition: sync.h:55
void Lock()
Definition: sync.h:101