Calling an async method using a Task.Run seems wrong?
问题 I recently came across this code written by a contractor we had working for us. It's either devilishly clever or silly (I think the latter but I wanted a second opinion). I'm not massively up to speed on async await . Basically it worked like this: public bool Send(TemplatedMessageDto message) { return Task.Run(() => SendAsync(message)) .GetAwaiter() .GetResult(); } public async Task<bool> SendAsync(TemplatedMessageDto message) { //code doing stuff var results = await _externalresource