GRPC Core
43.0.0
|
Originally written by ctiller, markdroth, and vjpai in October 2017
Revised by veblush in October 2019
gRPC core was originally written in C89 for several reasons (possibility of kernel integration, ease of wrapping, compiler support, etc). Over time, this was changed to C99 as all relevant compilers in active use came to support C99 effectively.
gRPC started allowing to use C++ with a couple of exceptions not to have C++ library linked such as libstdc++.so
. (For more detail, see the proposal)
Finally gRPC became ready to use full C++11 with the standard library by the proposal.
Throughout all of these transitions, the public header files are committed to remain in C89.
The goal now is to make the gRPC core implementation true idiomatic C++ compatible with Google's C++ style guide.
filesystem
. You can easily see whether PR is free from this issue by checking the result of Artifact Build Linux
test.thread_local
is not allowed to use on Apple's products because their old OSes (e.g. ios < 9.0) don't support thread_local
. Please use GPR_TLS_DECL
instead.<thread>
. Use grpc_core::Thread
.<condition_variable>
. Use grpc_core::CondVar
.<mutex>
. Use grpc_core::Mutex
, grpc_core::MutexLock
, and grpc_core::ReleasableMutexLock
.<future>
<ratio>
<system_error>
<filesystem>
using
when possible (e.g., Slice, ByteBuffer, ...)grpc_transport_stream_op_batch
rather than the core surface grpc_op
.