aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/tcp_posix.cc
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2018-09-27 14:23:29 -0700
committerGravatar Sree Kuchibhotla <sreek@google.com>2018-09-27 14:23:29 -0700
commitc33b593c8863ccc496e913bd82744ecc991c89f8 (patch)
treedc151504063482b152e9fe0c846b9735ade769cf /src/core/lib/iomgr/tcp_posix.cc
parentbc2305caffc8cb9b96a5a2a786ad6aa7c8789604 (diff)
Add comments on what 'covering' a write means
Diffstat (limited to 'src/core/lib/iomgr/tcp_posix.cc')
-rw-r--r--src/core/lib/iomgr/tcp_posix.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc
index ac1e919acb..4aad83915f 100644
--- a/src/core/lib/iomgr/tcp_posix.cc
+++ b/src/core/lib/iomgr/tcp_posix.cc
@@ -204,6 +204,15 @@ static void drop_uncovered(grpc_tcp* tcp) {
GPR_ASSERT(old_count != 1);
}
+/* gRPC API considers a Write operation to be done the moment it clears ‘flow
+ control’ i.e., and not necessarily sent on the wire. This means that the
+ application MAY NOT call `grpc_completion_queue_next/pluck` in a timely
+ manner when its `Write()` API is acked.
+
+ We need to ensure that the fd is 'covered' (i.e being monitored by some
+ polling thread and progress is made) and hence add it to a backup poller
+ here */
+
static void cover_self(grpc_tcp* tcp) {
backup_poller* p;
gpr_atm old_count =