[perl #129882] [CONC] [IO] Proc with `.in.close` and `.out.slurp-rest` in different threads, hangs

2016-10-14 Thread via RT
# New Ticket Created by  Sam S. 
# Please include the string:  [perl #129882]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=129882 >


The following code attempts to pipe a large Blob (larger than a pipe's
buffer size) through an external command.
However, it hangs on the `.in.close` line and never finishes:

my $proc = run «cat -», :in, :out, :bin;
my $input = ("a" x 100).encode;
my $promise = start {
$proc.in.write: $input;
$proc.in.close;
}
say $proc.out.slurp-rest(:close, :bin).bytes;
await $promise;

More verbose version of the code with debug output showing where it blocks:
https://gist.github.com/smls/75518c746ca65b3287482c491971eac0

IRC comments:

 moar sometimes gets confused, i think
 or maybe it's libuv

   shouldn't that give an error as other handles across threads do?

   you get the same behaviour with
   https://rt.perl.org/Public/Bug/Display.html?id=129787

Note that without the `start` (i.e. when writing to `.in` and then
reading from `.out` in the same thread), it already hangs on the
`.in.write`, as geekosaur explains:

   it will block if the process is not reading, yes. pipes have
  finite buffer space
   whether this block is happening at OS level or if libuv is
  supposed to be using non-blocking operations and return a "would
  block, try again" and some higher level is blocking based on
  that, I cannot say


[perl #129878] [bug][unicode] Grapheme boundaries not recalculated for string repetition

2016-10-14 Thread via RT
# New Ticket Created by  cygx 
# Please include the string:  [perl #129878]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=129878 >


Cf

say ("\c[REGIONAL INDICATOR SYMBOL LETTER G]" x 2).chars #=> 2

vs

say ([~] "\c[REGIONAL INDICATOR SYMBOL LETTER G]" xx 2).chars #=> 1



Re: [perl #129862] [BUG][POD] Pod::To::Text failing on uneven row lengths

2016-10-14 Thread Tom Browder
On Thu, Oct 13, 2016 at 8:32 PM, Zoffix Znet via RT
 wrote:
>
> PR merged[^1]; tests needed.
>
> [1] 
> https://github.com/rakudo/rakudo/commit/7af9ec9d90d4ec8e9732e979729df85a80f7ec11

See perl/roast PR 168.