Unless there is a good reason to have the thread SynchronizationContext preserved, all of your await ...calls throughout the library should have .ConfigureAwait(false) appended.
Not having this causes deadlocks when having to call your library in a synchronous manner such as:
var meta = ffmpeg.GetMetaDataAsync(input).GetAwaiter().GetResult();
Obviously you would ideally not call it this way using .GetAwaiter().GetResult() and instead use async+await 'all the way down'. But sometimes this is not an option.
Unless there is a good reason to have the thread
SynchronizationContext
preserved, all of yourawait ...
calls throughout the library should have.ConfigureAwait(false)
appended.Not having this causes deadlocks when having to call your library in a synchronous manner such as:
var meta = ffmpeg.GetMetaDataAsync(input).GetAwaiter().GetResult();
Obviously you would ideally not call it this way using
.GetAwaiter().GetResult()
and instead use async+await 'all the way down'. But sometimes this is not an option.