diff options
author | vjpai <vpai@google.com> | 2016-06-21 18:03:37 -0700 |
---|---|---|
committer | vjpai <vpai@google.com> | 2016-06-21 18:03:37 -0700 |
commit | bd28936c8648cde481fa20ca64ba00d9281cb119 (patch) | |
tree | 540d17b39bec8264e561df722605832e53589a48 /include | |
parent | ef01edf5b7c6eb008c7b0581354678aeeabd7680 (diff) |
Properly handle reviewer comment re concurrent Read
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc++/impl/codegen/async_stream.h | 7 | ||||
-rw-r--r-- | include/grpc++/impl/codegen/sync_stream.h | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h index cbc5d94429..e96d224ddb 100644 --- a/include/grpc++/impl/codegen/async_stream.h +++ b/include/grpc++/impl/codegen/async_stream.h @@ -74,8 +74,11 @@ class AsyncReaderInterface { /// Read a message of type \a R into \a msg. Completion will be notified by \a /// tag on the associated completion queue. - /// This is thread-safe with respect to other streaming APIs except for \a - /// Finish on the same stream. + /// This is thread-safe with respect to \a Write or \a WritesDone methods. It + /// should not be called concurrently with other streaming APIs + /// on the same stream. It is not meaningful to call it concurrently + /// with another \a Read on the same stream since reads on the same stream + /// are delivered in order. /// /// \param[out] msg Where to eventually store the read message. /// \param[in] tag The tag identifying the operation. diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h index e53717cabf..cbfa410699 100644 --- a/include/grpc++/impl/codegen/sync_stream.h +++ b/include/grpc++/impl/codegen/sync_stream.h @@ -71,8 +71,9 @@ class ReaderInterface { virtual ~ReaderInterface() {} /// Blocking read a message and parse to \a msg. Returns \a true on success. - /// This is thread-safe with respect to other streaming APIs except for \a - /// Finish on the same stream. (\a Finish must be called as described above.) + /// This is thread-safe with respect to \a Write or \WritesDone methods on + /// the same stream. It should not be called concurrently with another \a + /// Read on the same stream as the order of delivery will not be defined. /// /// \param[out] msg The read message. /// |