You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it is not possible to forget to close() the stream.
it is not possible to forget to call await().
thanks to coroutineScope we get automatic cancellation of all streams in case of failure of one job.
Bi directional API is less confusing and provide a clearer separation of the outgoing and incoming streams. (currently the same object is used to send and receive elements)
The text was updated successfully, but these errors were encountered:
Reading https://github.com/rouzwawi/grpc-kotlin#client I'm a bit surprised that the streaming from client to server are done by calling
send
on the result of the function.Personally I'd rather make the function taking a
ReceiveChannel
.Here is how the example in readme would look like:
Advantages of this style:
close()
the stream.await()
.coroutineScope
we get automatic cancellation of all streams in case of failure of one job.The text was updated successfully, but these errors were encountered: