Skip to content

Commit c5a63a1

Browse files
committed
core: Remove "can't call transport listener from start()" restriction
This hasn't been needed since f8f569e, when InternalSubchannel stopped calling start() with a lock held. Note that also means no transport needs to return a Runnable (but some still are). I had noticed in e4e7f3a that it was safe for InProcess to call the listener directly within start(), but I didn't notice this Javadoc that said it wasn't allowed.
1 parent 0fcd8cc commit c5a63a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

core/src/main/java/io/grpc/internal/ManagedClientTransport.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ public interface ManagedClientTransport extends ClientTransport {
3939
/**
4040
* Starts transport. This method may only be called once.
4141
*
42-
* <p>Implementations must not call {@code listener} from within {@link #start}; implementations
43-
* are expected to notify listener on a separate thread or when the returned {@link Runnable} is
44-
* run. This method and the returned {@code Runnable} should not throw any exceptions.
42+
* <p>This method and the returned {@code Runnable} should not throw any exceptions.
4543
*
4644
* @param listener non-{@code null} listener of transport events
4745
* @return a {@link Runnable} that is executed after-the-fact by the original caller, typically

0 commit comments

Comments
 (0)