grpc / grpc/grpc-java

ManagedClientTransport.start should be better defined

Open
#2,691 0 comments 0 reactions 0 assignees View on GitHub
code health
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

Calling `ManagedClientTransport.start` returns a Runnable, but it isn't clear what to do with it, or when it should be called. While the code is annotated `@CheckReturnValue`, the annotation doesn't get inherited across class boundaries, leading to places where the value is ignored. `NettyClientTransportTest` contains several invocations of `start`, but ignores the return value due to `NettyClientTransport` currently returning null.

The difficulty of describing when and how the Runnable should be used feels indicative of shaky API. It would be nice to modify InternalSubchannel to not need to acquire locks to alleviate the need to run code outside of locks. This is not urgent.

@zhangkun83

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.