class documentation

class _WeakChannel: (source)

Constructor: _WeakChannel(channel)

View In Hierarchy

Forward channel calls through a weak reference.

Internal token bearers run background renewal tasks on the SDK event loop. A strong channel reference from those tasks would keep a dropped channel reachable forever, because the loop thread keeps the loop and its tasks alive. Bearers that the channel creates for itself receive this handle instead. Calls fail with ChannelClosedError after the channel is collected.

Method __getattr__ Undocumented
Method __init__ Undocumented
Method discard_channel Undocumented
Method get_authorization_provider Undocumented
Method get_channel_by_method Undocumented
Method parent_id Undocumented
Method release_channel Close a returned lease when its parent channel was collected.
Method return_channel Undocumented
Method run_sync Undocumented
Method _get_channel Undocumented
Method _release_channel_soon Release without blocking, including after channel collection.
Instance Variable _channel_ref Undocumented
def __getattr__(self, name: str) -> Any: (source)

Undocumented

def __init__(self, channel: Channel): (source)

Undocumented

def discard_channel(self, chan: AddressChannel | None): (source)

Undocumented

def get_authorization_provider(self) -> AuthorizationProvider | None: (source)

Undocumented

def get_channel_by_method(self, method_name: str) -> AddressChannel: (source)

Undocumented

def parent_id(self) -> str | None: (source)

Undocumented

def release_channel(self, chan: AddressChannel | None, *, discard: bool = False): (source)

Close a returned lease when its parent channel was collected.

def return_channel(self, chan: AddressChannel | None): (source)

Undocumented

def run_sync(self, awaitable: Awaitable[T], timeout: float | None = None) -> T: (source)

Undocumented

def _get_channel(self) -> Channel: (source)

Undocumented

def _release_channel_soon(self, chan: AddressChannel | None, *, discard: bool = False): (source)

Release without blocking, including after channel collection.

_channel_ref = (source)

Undocumented