C# server handles responses "asynchronously" in the sense that the method 
stubs you need to implement are meant to be implemented as async methods. 
So you can write "synchronous code", but you shouldn't really block in your 
code (although starting from v1.6.0 this will work too).

Multiple request can be handled at once (and you don't need any 
sychronization to make that safe) and your handlers' code will run on a 
threadpool. You might of course need synchronization in your business 
logic, but that's a different question.

Channels are definitely thread safe are there are meant to be used to 
invoke muliple calls (channel creation is expensive compared to  call 
creation).


On Wednesday, September 6, 2017 at 2:51:40 AM UTC+2, [email protected] wrote:
>
> When multiple clients concurrently make the same call to a GRPC server, 
> does the server answere these calls asynchronously? I'm using C#. In case I 
> want the server to handle the calls synchronously should I use some sort of 
> locking like SemaphoreSlim?
>
> Additionally, I've read that creating a connection to a GRPC server is 
> time consuming and I'm supposed to share a connection/channel. Is the 
> chanel thread-safe?
>
> Thank you in advance.
>
>

-- 
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/4b0252bd-00e9-43e6-9734-80fead15fde6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to