icerpc / icerpc-csharp

A C# RPC framework built for QUIC, with bidirectional streaming, first-class async/await, and Protobuf support.
https://docs.icerpc.dev
Apache License 2.0
101 stars 13 forks source link

Split return task func #3914

Closed InsertCreativityHere closed 7 months ago

InsertCreativityHere commented 7 months ago

We have a return_task function which takes an is_dispatch bool. Almost everything in this function is just if is_dispatch {} else {}, so this PR just splits it into two separate functions: dispatch_return_task and invocation_return_task.

We re-implemented this function in the body of response_class. So, this PR also changes that logic to just call the new invocation_return_task.