C# | Faster than 100% (90ms) | TaskCompletionSource | Rightest Solution 🟢
Code\n\nusing System.Threading.Tasks;\npublic class Foo {\n    private TaskCompletionSource _f;\n    private TaskCompletionSource _s;\n    \n    public Foo()\n 
# Code\n```\nusing System.Threading.Tasks;\npublic class Foo {\n    private TaskCompletionSource _f;\n    private TaskCompletionSource _s;\n    \n    public Foo()\n    {\n        _f = new TaskCompletionSource();\n        _s = new TaskCompletionSource();\n    }\n\n    public void First(Action printFirst) {\n        printFirst();\n        _f.SetResult();\n    }\n\n    public void Second(Action printSecond)\n    {\n        _f.Task.Wait();\n        printSecond();\n        _s.SetResult();\n    }\n\n    public void Third(Action printThird)\n    { \n        _s.Task.Wait();\n        printThird();\n    }\n}\n```
['C#']