Help with promises, supplies and channels.

2022-04-05 Thread David Emanuel da Costa Santiago
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 {

Re: Help with promises, supplies and channels.

2022-04-05 Thread William Michels via perl6-users
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 < deman...@gmail.com> wrote: > Hi, > > > > I'm trying to learn about promises, supplies and channels. So i made > this code: > > """ > > my $p1 = Supply.interv

Re: Help with promises, supplies and channels.

2022-04-05 Thread David Emanuel da Costa Santiago
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 t

Re: Help with promises, supplies and channels.

2022-04-05 Thread William Michels via perl6-users
Thanks for the bash loop. I'm seeing a few hangs, also some errors returned saying: "Unhandled exception in code scheduled on thread 4" (MacOS 11.11) On Tue, Apr 5, 2022 at 12:47 PM David Emanuel da Costa Santiago < deman...@gmail.com> wrote: > > Hi William, > > when it fails or hangs it doesn'