I'm going to know the flow of execution in an await expression. As you know, the await expression should have a GetAwaiter() method, which returns an object of a type that we can call it an awaiter. The awaiter type must have 3 members. IsCompleted, GetResult and OnCompleted. I'm going to know that what is the order of calling these three members? At first step the CLR checks the IsCompleted And if it's false, it calls OnCompleted method that this method will get a delegate as it's argument. But who should call this delegate and in my awaiter class, where should I call this delegate? Thanks.
Asked
Active
Viewed 36 times