title: How should I convert a function returning a non-generic Task to ValueTask?
body: <p>I'm working on some code which builds a buffer in memory and then empties it into a <code>TextWriter</code> when the buffer fills up. Most of the time, the character will go straight into the buffer (synchronously) but occasionally (once every 4kb) I need to call <code>TextWriter.WriteAsync</code>.</p>
  
  <p>In <a href="https://www.nuget.org/packages/System.Threading.Tasks.Extensions" rel="noreferrer">the <code>System.Threading.Tasks.Extensions</code> package</a> there only appears to be a <a href="https://docs.microsoft.com/en-gb/dotnet/api/system.threading.tasks.valuetask-1?view=netcore-2.0" rel="noreferrer"><code>ValueTask&lt;T&gt;</code></a> struct, and no non-generic <code>ValueTask</code> (without a type parameter). Why is there no <code>ValueTask</code>, and what should I do if I need to convert a method returning a non-generic <code>Task</code> (that is, the async equivalent of a <code>void</code> method) to <code>ValueTask</code>?</p>