File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ val x: Int = Await.result(combined, 10.seconds) // 05
38
38
39
39
Lines 1 defines an asynchronous method: it returns a ` Future ` .
40
40
41
- Line 3 begins an ` async ` block. During compilation,
41
+ Line 2 begins an ` async ` block. During compilation,
42
42
the contents of this block will be analyzed to identify
43
43
the ` await ` calls, and transformed into non-blocking
44
44
code.
@@ -47,7 +47,7 @@ Control flow will immediately pass to line 5, as the
47
47
computation in the ` async ` block is not executed
48
48
on the caller's thread.
49
49
50
- Line 4 begins by triggering ` slowCalcFuture ` , and then
50
+ Line 3 begins by triggering ` slowCalcFuture ` , and then
51
51
suspending until it has been calculating. Only after it
52
52
has finished, we trigger it again, and suspend again.
53
53
Finally, we add the results and complete ` combined ` , which
You can’t perform that action at this time.
0 commit comments