On Thu Jul 21 14:42:42 2016, moritz wrote:
> 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 :-)
> 
It should have worked. Since this RT was filed, multiple fixes have been made 
to supplies, and it seems one of them nailed this bug. I committed a test in 
S17-supply/zip-latest.t (and checked that it hung back in the June release, so 
it seems it covers it decently well).

Reply via email to