diff options
author | 2017-04-21 08:08:05 -0700 | |
---|---|---|
committer | 2017-04-21 08:08:05 -0700 | |
commit | decec093169c93a8e6d033ff9971b0999a2766a3 (patch) | |
tree | 4564fecaaeead3f75212215c9252b26b16b44ecf /include/grpc | |
parent | 6984e1dc5e2687edd69cf3d9c761d6c8386b1fb8 (diff) | |
parent | 77a4c52cbf3706191640e117b1f9bccddd64f1ac (diff) |
Merge github.com:grpc/grpc into c++lame
Diffstat (limited to 'include/grpc')
-rw-r--r-- | include/grpc/grpc.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 9a65d34ce3..5ded451540 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -265,6 +265,10 @@ GRPCAPI grpc_call *grpc_channel_create_registered_call( grpc_completion_queue *completion_queue, void *registered_call_handle, gpr_timespec deadline, void *reserved); +/** Allocate memory in the grpc_call arena: this memory is automatically + discarded at call completion */ +GRPCAPI void *grpc_call_arena_alloc(grpc_call *call, size_t size); + /** Start a batch of operations defined in the array ops; when complete, post a completion of type 'tag' to the completion queue bound to the call. The order of ops specified in the batch has no significance. @@ -341,7 +345,7 @@ GRPCAPI void grpc_channel_destroy(grpc_channel *channel); /** Called by clients to cancel an RPC on the server. Can be called multiple times, from any thread. THREAD-SAFETY grpc_call_cancel and grpc_call_cancel_with_status - are thread-safe, and can be called at any point before grpc_call_destroy + are thread-safe, and can be called at any point before grpc_call_unref is called.*/ GRPCAPI grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved); @@ -356,9 +360,13 @@ GRPCAPI grpc_call_error grpc_call_cancel_with_status(grpc_call *call, const char *description, void *reserved); -/** Destroy a call. - THREAD SAFETY: grpc_call_destroy is thread-compatible */ -GRPCAPI void grpc_call_destroy(grpc_call *call); +/** Ref a call. + THREAD SAFETY: grpc_call_unref is thread-compatible */ +GRPCAPI void grpc_call_ref(grpc_call *call); + +/** Unref a call. + THREAD SAFETY: grpc_call_unref is thread-compatible */ +GRPCAPI void grpc_call_unref(grpc_call *call); /** Request notification of a new call. Once a call is received, a notification tagged with \a tag_new is added to |