Course of Raku / Functional, concurrent, reactive, and web programming / Reactive programming / await / Awaiting a promise

Quiz — await

What does the following program print?

my $p = start { 8 * 8 };
say await $p;
0Promise
08
164
0True

await waits for the single promise to finish and returns its result. The block computes 8 * 8, so await $p is 64.

Course navigation

Awaiting a promise   |   Waiting for completion