diff options
author | Vijay Pai <vpai@google.com> | 2018-10-18 11:18:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-18 11:18:02 -0700 |
commit | dfcc96227c6fe1a18068171c988cb0c5f1250f19 (patch) | |
tree | 6922833e43c821431fbe39c99756566e1dd25966 /include/grpc | |
parent | 6577a623133b95fc17194574bbbfc6381bf23d84 (diff) | |
parent | 4a1a447d35a705c42d6b5d70851a22e7fd67b466 (diff) |
Merge pull request #16362 from overvenus/formalize-empty-batch
Formalize the contract of grpc_call_start_batch with empty batches
Diffstat (limited to 'include/grpc')
-rw-r--r-- | include/grpc/grpc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 02ab6e8ba4..514d9ddc4b 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -248,10 +248,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); |