title: Is ConfigureAwait(false) needed/beneficial when awaiting async calls in Azure Functions
body: <p>It is generally recommended to use <code>ConfigureAwait(false)</code> when awaiting async calls when context is not required. Just wondering is there any benefit of using <code>ConfigureAwait(false)</code> in Azure Functions. </p>
  
  <p>Do Azure Function threads have non-null <code>SynchronizationContext</code> as such it would make beneficial to use <code>ConfigureAwait(false)</code> to avoid unnecessarily capturing it and rescheduling the await continuation back on the captured <code>SynchronizationContext</code>?</p>
  
  <p>It is a bit of a churn to add <code>ConfigureAwait(false)</code> at the end of every async call so prefer to avoid it for the code that runs in Azure Functions if there is no perf/or any other related gain.</p>
  
  <p>Looking at the azure function host code:
  <a href="https://github.com/Azure/azure-functions-host/blob/918b057707acfb842659c9dad3cef0193fae1330/src/WebJobs.Script.WebHost/WebScriptHostManager.cs#L181" rel="noreferrer">https://github.com/Azure/azure-functions-host/blob/918b057707acfb842659c9dad3cef0193fae1330/src/WebJobs.Script.WebHost/WebScriptHostManager.cs#L181</a></p>
  
  <p>it seems like azure function host attempts to strip out the ASP.NET SynchronizationContext before calling the azure function. </p>