Is it safe to execute a listener using MoreExecutors.directExecutor(), as in

ListenableFuture<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.

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/ecd12508-7851-4220-a2b5-658b57ad2d42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to