Closed anjmao closed 7 years ago
Thanks, you are absolutely right. That is legacy code, I wrote it at the beginning of the development when I was doing some experiments. Please look at other controllers that are already using the SendSync method already implemented in CommandSender. I'll fix asap this and other controllers. I'll close this issue once everything is fixed.
All controllers have been updated. I made the modified actions sync for the time being. I'll make them async again once the related async command handlers have been implemented. Thanks again :-)
Hi, just looked at Weapsy code and found some interesting parts like in SiteController.cs
I hope you know that by running Task.Run you are scheduling execution of _commandSender.Send on thread pool, so in this case you loosing real asynchrony and it is recommended to remove async await and Taks.Run at all (it will run faster and require less resources) or better Add
SendAsync
implementation to commandSender so you dont need to useTask.Run