Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (17 sloc) 0.435 kB
use Threads;
my ($read, $write) = objectpipe;
my $t = Threads::Thread.new({
my $last = 0;
for 1..200 -> $i { $write.put($i~'-'~time); $last = $i; };
CATCH { default { say "pipe closed... sent $last items" } }
});
$read.thread = $t;
{
for 1..5 {
say $read.get() for 1..20;
sleep 1
}
$read.DESTROY();
$read = Nil;
}
say "compare the number of the last consumed item, with the last sent item."
Jump to Line
Something went wrong with that request. Please try again.