aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/client_channel/lb_policy.h
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-11-01 13:00:58 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2016-11-01 13:09:19 -0700
commite224a76a6e7523012d8be899240c4cee1ba6f2b4 (patch)
tree5598f95e81ad5bd7391e3ec4d1328fa25542fb0f /src/core/ext/client_channel/lb_policy.h
parentcbc059eb7eb557b60c3f6c627f4b498ce6a02363 (diff)
PR comments, take three
Diffstat (limited to 'src/core/ext/client_channel/lb_policy.h')
-rw-r--r--src/core/ext/client_channel/lb_policy.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/ext/client_channel/lb_policy.h b/src/core/ext/client_channel/lb_policy.h
index 54ad779792..120c641edc 100644
--- a/src/core/ext/client_channel/lb_policy.h
+++ b/src/core/ext/client_channel/lb_policy.h
@@ -109,10 +109,16 @@ struct grpc_lb_policy_vtable {
/*#define GRPC_LB_POLICY_REFCOUNT_DEBUG*/
#ifdef GRPC_LB_POLICY_REFCOUNT_DEBUG
+
+/* Strong references: the policy will shutdown when they reach zero */
#define GRPC_LB_POLICY_REF(p, r) \
grpc_lb_policy_ref((p), __FILE__, __LINE__, (r))
#define GRPC_LB_POLICY_UNREF(exec_ctx, p, r) \
grpc_lb_policy_unref((exec_ctx), (p), __FILE__, __LINE__, (r))
+
+/* Weak references: they don't prevent the shutdown of the LB policy. When no
+ * strong references are left but there are still weak ones, shutdown is called.
+ * Once the weak reference also reaches zero, the LB policy is destroyed. */
#define GRPC_LB_POLICY_WEAK_REF(p, r) \
grpc_lb_policy_weak_ref((p), __FILE__, __LINE__, (r))
#define GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, p, r) \