MCPcopy Create free account
hub / github.com/grpc/grpc-java / cancellableAncestor

Method cancellableAncestor

api/src/context/java/io/grpc/Context.java:1095–1102  ·  view source on GitHub ↗

Returns parent if it is a CancellableContext, otherwise returns the parent's #cancellableAncestor.

(Context parent)

Source from the content-addressed store, hash-verified

1093 * {@link #cancellableAncestor}.
1094 */
1095 static CancellableContext cancellableAncestor(Context parent) {
1096 if (parent instanceof CancellableContext) {
1097 return (CancellableContext) parent;
1098 }
1099 // The parent simply cascades cancellations.
1100 // Bypass the parent and reference the ancestor directly (may be null).
1101 return parent.cancellableAncestor;
1102 }
1103
1104 /**
1105 * If the ancestry chain length is unreasonably long, then print an error to the log and record

Callers 2

ContextMethod · 0.95

Calls

no outgoing calls

Tested by 1