diff options
author | Vijay Pai <vpai@google.com> | 2017-07-20 10:33:52 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2017-07-20 10:33:52 -0700 |
commit | 0c22cad01fe778ca2df217c7ef2a68dfac24254d (patch) | |
tree | e9c62b96cd9a869f67b80586af770855da04ab2e | |
parent | 66cedf645dfdb1c195181d1cff289792a43854b6 (diff) |
Improve a comment in inproc transport
-rw-r--r-- | src/core/ext/transport/inproc/inproc_transport.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/ext/transport/inproc/inproc_transport.c b/src/core/ext/transport/inproc/inproc_transport.c index 4df64d81e2..14498021eb 100644 --- a/src/core/ext/transport/inproc/inproc_transport.c +++ b/src/core/ext/transport/inproc/inproc_transport.c @@ -190,8 +190,11 @@ typedef struct inproc_stream { static bool inproc_slice_byte_stream_next(grpc_exec_ctx *exec_ctx, grpc_byte_stream *bs, size_t max, grpc_closure *on_complete) { - inproc_slice_byte_stream *stream = (inproc_slice_byte_stream *)bs; - return (stream->le->sb.count != 0); + // Because inproc transport always provides the entire message atomically, + // the byte stream always has data available when this function is called. + // Thus, this function always returns true (unlike other transports) and + // there is never any need to schedule a closure + return true; } static grpc_error *inproc_slice_byte_stream_pull(grpc_exec_ctx *exec_ctx, |