title: How to safely mix sync and async code?
body: <p>I have this library which is purely sync. It exposes sync methods and I have clients using it.</p>
  
  <p>I changed the underlying implementation to async and exposed async methods for whoever wants to use it. But now I have lots of replicated code. Async code seems to perform better. I'd like existing clients to take advantage of it and I want to eliminate code repetition.</p>
  
  <p>Is there any safe way to keep a sync signature and call async implementation?</p>
  
  <p>I'm specifically afraid of deadlocks when calling .Result and .Wait.</p>