Hi,

I'm using onReady() to initialize my client connection (a long lived bidi 
connection) and then using isReady() like:

public void onNext(MyMessage msg) {
  while( ! requestStream.isReady() ){ sleep-for-som-short-time }
  requestStream.request(1);
  requestStream.onNext(msg);
}

Which seems to work fine, but it also causes high CPU usage. Is there a 
better way to handle sending messages from the client to server without 
looping + sleeping like this?

Thanks,
- Matt

-- 
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].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/ad2ee22e-9b55-42f5-905c-1928ea274468%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to