MCPcopy Index your code
hub / github.com/grpc/grpc-java / call

Method call

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

Immediately call a Callable with this context as the #current context. @param c Callable to call. @return result of call.

(Callable<V> c)

Source from the content-addressed store, hash-verified

545 * @return result of call.
546 */
547 @CanIgnoreReturnValue
548 public <V> V call(Callable<V> c) throws Exception {
549 Context previous = attach();
550 try {
551 return c.call();
552 } finally {
553 detach(previous);
554 }
555 }
556
557 /**
558 * Wrap a {@link Runnable} so that it executes with this context as the {@link #current} context.

Callers 4

Calls 2

attachMethod · 0.95
detachMethod · 0.95

Tested by 4