I have this library which is purely sync. It exposes sync methods and I have clients using it.
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.
Is there any safe way to keep a sync signature and call async implementation?
I'm specifically afraid of deadlocks when calling .Result and .Wait.