On Mon Dec 22 06:37:08 2014, moritz wrote:
> moritz> m: my $s = Supply.new; $s.tap(&say); $s.done; $s.emit('still here')
> camelia> rakudo-moar 284c09: OUTPUT«still here␤»
> 
> This is likely a bug; .done should either shut down the supply (and so 
> forbid future .emit calls), or at least throw out the taps. Currently it 
> only distributes .done messages to all tappers, which seems exceedingly 
> weak.

Supplies now go to some effort to enforce the supply grammar (emit* 
[done|quit]); you have to go out of your way (like, actually ask for an 
unsanitized supply) to get the previous behavior (which you may occasionally 
want to do for performance reasons). Tests in S17-supply/basic.t. Note that 
values emitted after a done will simply be dropped, so the grammar is followed 
from an observers point of view.

/jnthn

Reply via email to