SubchannelInterface: use DualRefCounted<> (#32181)

* SubchannelInterface: use DualRefCounted<>

* Automated change: Fix sanity tests

Co-authored-by: markdroth <markdroth@users.noreply.github.com>
pull/32127/head
Mark D. Roth 2 years ago committed by GitHub
parent 7f7a352ccc
commit 3422d7e5b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/BUILD
  2. 8
      src/core/lib/load_balancing/subchannel_interface.h

@ -2490,8 +2490,8 @@ grpc_cc_library(
hdrs = ["lib/load_balancing/subchannel_interface.h"],
external_deps = ["absl/status"],
deps = [
"dual_ref_counted",
"iomgr_fwd",
"ref_counted",
"//:event_engine_base_hdrs",
"//:gpr_platform",
"//:ref_counted_ptr",

@ -26,14 +26,14 @@
#include <grpc/impl/connectivity_state.h>
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/dual_ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/iomgr_fwd.h"
namespace grpc_core {
// The interface for subchannels that is exposed to LB policy implementations.
class SubchannelInterface : public RefCounted<SubchannelInterface> {
class SubchannelInterface : public DualRefCounted<SubchannelInterface> {
public:
class ConnectivityStateWatcherInterface {
public:
@ -59,10 +59,12 @@ class SubchannelInterface : public RefCounted<SubchannelInterface> {
};
explicit SubchannelInterface(const char* trace = nullptr)
: RefCounted<SubchannelInterface>(trace) {}
: DualRefCounted<SubchannelInterface>(trace) {}
~SubchannelInterface() override = default;
void Orphan() override {}
// Starts watching the subchannel's connectivity state.
// The first callback to the watcher will be delivered ~immediately.
// Subsequent callbacks will be delivered as the subchannel's state

Loading…
Cancel
Save