aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2016-07-18 16:30:58 -0700
committerGravatar yang-g <yangg@google.com>2016-07-18 16:30:58 -0700
commitc76e48b8d38ed8d1c0359a3da2e60b87b93a99d9 (patch)
treef3c9e2b5e9f3d5345f6e46f07e6414262acd0377 /include
parent9275d4067cfd9233edf2ae9a0fe1255c8c730f19 (diff)
parent2eebe29ec84ed6b2d5c64016b12e1782281d5a38 (diff)
Merge remote-tracking branch 'upstream/master' into shut_down_acceptor_early
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/server.h3
-rw-r--r--include/grpc++/support/slice.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/include/grpc++/server.h b/include/grpc++/server.h
index 7a8858ef19..6876961e21 100644
--- a/include/grpc++/server.h
+++ b/include/grpc++/server.h
@@ -179,10 +179,13 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
grpc::mutex mu_;
bool started_;
bool shutdown_;
+ bool shutdown_notified_;
// The number of threads which are running callbacks.
int num_running_cb_;
grpc::condition_variable callback_cv_;
+ grpc::condition_variable shutdown_cv_;
+
std::shared_ptr<GlobalCallbacks> global_callbacks_;
std::list<SyncRequest>* sync_methods_;
diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h
index cec9062d4f..5874b4f5ae 100644
--- a/include/grpc++/support/slice.h
+++ b/include/grpc++/support/slice.h
@@ -77,6 +77,9 @@ class Slice GRPC_FINAL {
/// Raw pointer to the end (one byte \em past the last element) of the slice.
const uint8_t* end() const { return GPR_SLICE_END_PTR(slice_); }
+ /// Raw C slice. Caller needs to call gpr_slice_unref when done.
+ gpr_slice c_slice() const { return gpr_slice_ref(slice_); }
+
private:
friend class ByteBuffer;