diff options
author | Juanli Shen <juanlishen@google.com> | 2017-09-13 13:10:54 -0700 |
---|---|---|
committer | Juanli Shen <juanlishen@google.com> | 2017-09-13 13:10:54 -0700 |
commit | 6502ecc812cba929453115a0475804304db243a6 (patch) | |
tree | f89eaf0c1a5d078c1caa16f2e6af40d5295d3292 /src/core/ext/filters/client_channel/subchannel_index.h | |
parent | e0de23ed32924fadf22ee1414ab98a6fd85b3a66 (diff) |
Add refcount to subchannel_index.
Diffstat (limited to 'src/core/ext/filters/client_channel/subchannel_index.h')
-rw-r--r-- | src/core/ext/filters/client_channel/subchannel_index.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/ext/filters/client_channel/subchannel_index.h b/src/core/ext/filters/client_channel/subchannel_index.h index 98d882a453..92e36d5283 100644 --- a/src/core/ext/filters/client_channel/subchannel_index.h +++ b/src/core/ext/filters/client_channel/subchannel_index.h @@ -59,6 +59,13 @@ void grpc_subchannel_index_init(void); /** Shutdown the subchannel index (global) */ void grpc_subchannel_index_shutdown(void); +/** Increment the refcount (non-zero) of subchannel index (global). */ +void grpc_subchannel_index_ref(void); + +/** Decrement the refcount of subchannel index (global). If the refcount drops + to zero, unref the subchannel index and destroy its mutex. */ +void grpc_subchannel_index_unref(void); + /** \em TEST ONLY. * If \a force_creation is true, all key comparisons will be false, resulting in * new subchannels always being created. Otherwise, the keys will be compared as |