All custom await-code should be removed and TaskCompletionSources should be used instead.
In classes like Playlist that can be awaited, a private TaskCompletionSource should be added, and instanciated when needed (using Interlocked.CompareExchange). The await-methods (GetAwaiter etc.) that are currently added through extension-methods from the C# library should be added into the class itself.
All custom await-code should be removed and
TaskCompletionSource
s should be used instead.In classes like
Playlist
that can be awaited, a privateTaskCompletionSource
should be added, and instanciated when needed (usingInterlocked.CompareExchange
). The await-methods (GetAwaiter
etc.) that are currently added through extension-methods from the C# library should be added into the class itself.