# New Ticket Created by  Timo Paulssen 
# Please include the string:  [perl #132091]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132091 >


I'm using two start blocks that return Slips to generate a long list in
parallel, then i iterate over the result in the Moar Heap Analyzer.

Trying to take advantage of v6.d's nonblocking await gives me a change
in semantics, though:

    use v6.d.PREVIEW;
    use Test;
    my @foo = do {
        await start { do for ^2 { my uint64 @ = 9, 9; }.Slip },
              start { do for ^2 { my uint64 @ = 1, 2; }.Slip };
    };
    is @foo.elems, 4, "slips awaited over get flattened out";
    say @foo.perl

    # -> not ok 1 - slips awaited over get flattened out
    # -> [slip(array[uint64].new(9, 9), array[uint64].new(9, 9)),
slip(array[uint64].new(1, 2), array[uint64].new(1, 2))]

    use Test;
    my @foo = do {
        await start { do for ^2 { my uint64 @ = 9, 9; }.Slip },
              start { do for ^2 { my uint64 @ = 1, 2; }.Slip };
    };
    is @foo.elems, 4, "slips awaited over get flattened out";
    say @foo.perl

    # -> ok 1 - slips awaited over get flattened out
    # -> [array[uint64].new(9, 9), array[uint64].new(9, 9),
array[uint64].new(1, 2), array[uint64].new(1, 2)]

Reply via email to