Cysharp / MagicOnion

Unified Realtime/API framework for .NET platform and Unity.
MIT License
3.68k stars 417 forks source link

Question: Possible to use Task and ValueTask instead of UnaryResult and such? #719

Closed Metadorius closed 2 days ago

Metadorius commented 7 months ago

Use case: I currently have a thick client in .NET Framework, but we need to decouple business logic into a separate server for security. Currently our code is using Task, all interfaces and database access objects that implement them are using tasks. We also may need to have both thick and thin clients.

Currently from what we see there are two issues:

Hence why - is it possible to use Task/ValueTask, if not atm - can that be implemented in a reasonable amount of effort?

mayuki commented 7 months ago

It is possible to modify to directly return Task/ValueTask, but it requires modifications in various codes and the validity needs to be examined, so there are no plans for this at the moment.

UnaryResult is exposed only at the service interface level and expects Task/ValueTask to be used for internal logic.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.