Concurrency, react-ing to more than one supply at a time
问题 Please consider the code below. Why is the output of this is "BABABA" and not "AAABAA" / "AABAAAB"? Shouldn't the two supplies run in parallel and the whenever fire immedeatly when there is an event in any of them? my $i = 0; my $supply1 = supply { loop { await Promise.in(3); done if $i++> 5; emit("B"); } }; my $supply2 = supply { loop { await Promise.in(1); done if $i++> 5; emit("A"); } }; react { #whenever Supply.merge($supply1, $supply2) -> $x { $x.print } whenever $supply1 -> $x { $x