aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Neil Shen <overvenus@gmail.com>2018-08-16 15:12:45 +0800
committerGravatar Neil Shen <overvenus@gmail.com>2018-08-16 15:12:45 +0800
commit4a1a447d35a705c42d6b5d70851a22e7fd67b466 (patch)
treef0870b8b091a8e99c2d969d832340a2c794b852d /include
parent8a86f5329e07ee90b832195dac7b1d88637bec39 (diff)
Formalize the contract of grpc_call_start_batch with empty batches
Diffstat (limited to 'include')
-rw-r--r--include/grpc/grpc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index 897b89851a..546243623f 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -241,10 +241,13 @@ GRPCAPI void* grpc_call_arena_alloc(grpc_call* call, size_t size);
appropriate to call grpc_completion_queue_next or
grpc_completion_queue_pluck consequent to the failed grpc_call_start_batch
call.
+ If a call to grpc_call_start_batch with an empty batch returns
+ GRPC_CALL_OK, the tag is put in the completion queue immediately.
THREAD SAFETY: access to grpc_call_start_batch in multi-threaded environment
needs to be synchronized. As an optimization, you may synchronize batches
containing just send operations independently from batches containing just
- receive operations. */
+ receive operations. Access to grpc_call_start_batch with an empty batch is
+ thread-compatible. */
GRPCAPI grpc_call_error grpc_call_start_batch(grpc_call* call,
const grpc_op* ops, size_t nops,
void* tag, void* reserved);