I'm going to talk about async- awaitand I am creating a flowchart that tries to show possible execution orders.
async
await
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., , . (, ), "", "".
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
usr , , . . , , - . , . , . , ; , .
, : " ?" - , . , . , . .
, , , .
, ; , , , , .
.
, . (, ), . Task, . (, , ,...).
Task
, async .
" " , . , - . , , .
. await Thread.Join().
Thread.Join()
Source: https://habr.com/ru/post/1663471/More articles:Android Studio cannot undo - androidЛокализация, альтернативная файлу Resx - c#Android - Ellipsize not working for link in TextView - androidЗначение параметра переопределения Javascript перед установкой - javascriptSwift 3 - How to define a callback function as a parameter - functionScala Play 2.5 Form bindFromRequest: Can't find the HTTP request here? - scalaPerl: removing array elements and resizing an array - arraysWhy use a contractile or saxon saga for sampling? - reactjsES6 Fat Arrow and brackets `(...) => ({...})` - javascriptLemmainser uses NLTK - pythonAll Articles