Is this the correct async wait diagram?

I'm going to talk about async- awaitand I am creating a flowchart that tries to show possible execution orders.

enter image description here

I tried to compose this from paragraphs

The start of the asynchronous method is the same as any other method. That is, it works synchronously until it reaches “wait” (or throws an exception).

The keyword “wait” is something that can become asynchronous. Waiting as a unary operator: it takes one argument, expected ("awaitable" is an asynchronous operation). Expects that it is already completed; if the expected is already completed, then the method just continues to work (synchronously, like a regular method).

"" , , . , , , async.

, , . (, ), "", "".

http://blog.stephencleary.com/2012/02/async-and-await.html

+4
2

usr , , . . , , - . , . , . , ; , .

, : " ?" - , . , . , . .

, , , .

, ; , , , , .

+2

enter image description here

.

, . (, ), . Task, . (, , ,...).

, async .

" " , . , - . , , .

. await Thread.Join().

+1

Source: https://habr.com/ru/post/1663471/


All Articles