MoreExecutors.directExecutor(), as inListenableFuture<MyResponse> res = myFutureStub.myMethod(myRequest);
res.addListener(myCallback, MoreExecutors.directExecutor());
Is it safe to execute a listener usingMoreExecutors.directExecutor(), as inListenableFuture<MyResponse> res = myFutureStub.myMethod(myRequest);
res.addListener(myCallback, MoreExecutors.directExecutor());
or may I run into problems using this pattern (as I'll be using gRPC's default executor's threads)? Most of the time myCallback only sets the value of a Spring's DeferredResult and returns, but in a few cases I can't address right now it will block the thread for a few milliseconds.