title: How to write an "awaitable" method?
body: <p>I'm finally looking into the async &amp; await keywords, which I kind of &quot;get&quot;, but all the examples I've seen call async methods in the .Net framework, e.g. <a href="https://docs.microsoft.com/en-us/dotnet/csharp/async" rel="nofollow noreferrer">this one</a>, which calls <code>HttpClient.GetStringAsync()</code>.</p>
  <p>What I'm not so clear on is what goes on in such a method, and how I would write my own &quot;awaitable&quot; method. Is it as simple as wrapping the code that I want to run asynchronously in a Task and returning that?</p>