On Thu, 24 Nov 2016 07:01:27 -0800, g...@google.com wrote:
> See discussion starting at:
> 
>     https://irclog.perlgeek.de/perl6-dev/2016-11-24#i_13623505
> 
> In short, if the interval is too short, the supply will stop progressing:
> 
> 06:54 < jnthn> m: react { whenever Supply.interval(.001) { .say; done
> if $_ == 5 } }
> 06:54 < camelia> rakudo-moar 1b840f: OUTPUT«0␤1␤2␤3␤4␤5␤»
> 06:54 < jnthn> m: react { whenever Supply.interval(.0001) { .say; done
> if $_ == 5 } }
> 06:54 < camelia> rakudo-moar 1b840f: OUTPUT«(timeout)0␤»
> 06:54 < jnthn> Yup, that's decidedly wrong.

The minimum resolution supported is 1ms. We were thus doing something like 
($secs * 1000).Int, which ended up as zero, which is also the value for the 
repeat interval that means "don't repeat". Thus it only ever spat out one value.

Now we round to 1ms in this case, and produce a warning that we don't support 
resolutions below that.

Test added for non-hanging on S17-supply/interval.t.

/jnthn

Reply via email to