Hi William, when it fails or hangs it doesn't print the last line. Please check attached file for output of the stack. Since the failures are random, it's easier to invoke it in a loop: bash$ for i in $(seq 100); do raku test.raku; done If nothing is wrong with the code, i'll open a bug in the github. Regards, David Santiago Às 21:37 de 05/04/22, William Michels escreveu: > No problems so far. > > say $*VM; #add as last line, returns: > moar (2021.06) > > On Tue, Apr 5, 2022 at 11:06 AM David Emanuel da Costa Santiago > <demanuel@gmail.com <mailto:demanuel@gmail.com>> wrote: > > Hi, > > > > I'm trying to learn about promises, supplies and channels. So i made > this code: > > """ > > my $p1 = Supply.interval(5); > my $p2 = Supply.interval(2); > my Channel $ch = Channel.new; > > my $prom = start react { > whenever $p1 -> $interval { > say "5"; > } > > whenever $p2 -> $interval { > say 2; > } > > whenever $ch.closed { > done; > } > > whenever $ch -> $data { > say "Data: $data"; > } > } > > my $prom2 = start react { > whenever $p1 -> $interval { > $ch.send("5.2"); > $ch.close; > } > whenever $ch.closed { > done; > } > } > > my @proms = ($prom, $prom2); > await Promise.allof(@proms); > > """ > > > > I don't see anything wrong with this but most of the times runs fine, > sometimes hangs, sometimes throw exception. Am i doing something that i > shouldn't be doing? > > $ raku --version > Welcome to Rakudo™ v2022.03-130-g8f7cc0847. > Implementing the Raku® Programming Language v6.d. > Built on MoarVM version 2022.03-13-ga3476e286. > > > > Regards, > David Santiago >Thread Previous | Thread Next