title: Fire and Forget using Async over Sync
body: <p>We are using Umbraco 8 which have IComponent which allows us to hook events(which does not have async support). We have enabled hook like,</p>
  <pre><code>public class MyHookComponent : IComponent
  {
      private static readonly HttpClient _httpClient = new HttpClient();
      private readonly ILogger _logger;
  
      static MyHookComponent()
      {
          _httpClient.BaseAddress = new SomeBaseUrl;
      }
  
      public MyHookComponent(ILogger logger)
      {
          _logger = logger;
      }
  
      public void Initialize()
      {
          ContentService.Published += OnNodePublished;
      }
  
      private void OnNodePublished(IContentService contentService, ContentPublishedEventArgs e)
      {
          // Do some work
          Task.Run(() =&gt; SomeAsyncWork(url));
      }
  
      private async Task SomeAsyncWork(string url)
      {
          try
          {
              await _httpClient.PostAsync(url, null);
          }
          catch (Exception ex)
          {
              _logger.Error(typeof(MyHookComponent), ex);
          }
      }
  </code></pre>
  <p>Fire and forget style is from <a href="https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md#async-void" rel="nofollow noreferrer">https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md#async-void</a></p>
  <p>Does the above code lead to deadlock or thread starvation as I we got some issue(very slow response after this change suddenly) on staging which (but no dump for investigation).</p>
  <p>We have System.Web.Http, Version=5.2.7.0</p>