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


Consider this code:

#!/usr/bin/env perl6

my $source = Supply.interval(1);
$source.tap({ say 'DEBUG: source'});
my $heartbeat = Supply.interval(0.7);
$heartbeat.tap({ say 'DEBUG: heartbeat'});
react {
    whenever $source.zip-latest($heartbeat) {
        say 'WHENEVER';
    }
}

# Output:
# DEBUG: source
# DEBUG: heartbeat
# DEBUG: heartbeat
# DEBUG: source
# DEBUG: heartbeat
#
# ... and then it hangs, and produces no output anymore.

The mere fact that I combine those two supplies with zip-latest stops
the original supplies from producing values (or at least from calling
the .tap), and the whenever block isn't executed either.

So either I totally misunderstood zip-latest, or it's totally b0rked. Or
both :-)

-- 
Moritz Lenz
https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Reply via email to