On Fri Jul 15 12:32:30 2016, mt1...@gmail.com wrote: > With Rakudo version 2016.06-234-g0189851 built on MoarVM version > 2016.06-9-g8fc21d5 > implementing Perl 6.c on a Asus laptop running Fedora 23 I see the > following happen. Running the code below is doing well but when the code > in the critical section gets complex (e.g. '$r += [+] $i, 3, 4, 5, 6, 7, > 8, 9, 10;'), the program does not finish. The output of the '+' and '-' > stops but the cpu (2 or 3 of 8) will go to 100% usage (user time, not > system time). > > > my Semaphore $s .= new(1); > > my @p; > my $r; > for ^4000 { > my $i = $_; > > @p.push: Promise.start( { > > $s.acquire; > print "+"; > > # critical code area > $r += $i; > > $s.release; > print "-"; > } > ); > } >
This is largely addressed by: https://github.com/MoarVM/MoarVM/commit/236058a6c8bd91eacf100047831ac77e4ad486b7 However, there is an occasional GC orchestration hang that I'm still looking into.