The call order of await is not used?
17723010593 opened this issue · 2 comments
Like you showed, No! But you can do:
playerGrain.Startup().Wait();
playerGrain.ClientOnline().Wait();
Though you should NOT do that, as those calls can be remote calls and you'll be blocking the current thread for an IO operation which is never a good thing
Try with the attribute OneWayAttribute on you method "Startup" on the interface.
https://learn.microsoft.com/en-us/dotnet/orleans/grains/oneway
At least you will correctly use the await on the method called but the execution will not be blocked by the execution.
Add this attribute and await will only ensure that call request to "Startup" leave before than "ClientOnline". Grain are one thread by default. Then you should have your expected behavior to have the two method called after the other in the good order without blocking your calling thread