Skip to content

Instantly share code, notes, and snippets.

Created April 6, 2017 18:49
async call
class A
{
method run()
{
my $i = 0;
method generate()
{
i = 10.rand();
return i;
}
}
}
class B{
method run()
{
my $b = False;
my $i = start {.generate()};
await $i;
my $x = $i.result;
if $x < 10
{
$b = True;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment