The danger of TaskCompletionSource class
... when used with async/await. TaskCompletionSource class is a very useful facility if you want to control the lifetime of a task manually. I share a canonical example when TaskCompletionSource is used for converting the event-based asynchronous code to the Task-based pattern.