New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel.Supply ignores explicit Nil sent on Channel #5159
Comments
From @skidsThis should say "got Nil" in there somewhere. $ perl6 -e 'my $c = Channel.new; my $s = $c.Supply; $s.tap: { say "got " ~ $_ }; for 1,2,Nil,3 { say "emit " ~ $_.perl; $c.send($_) }; sleep 0.1' This happens because the Supply code in Channel.pm(line 114 atm) uses .poll and assumes a Nil returned from it requires checking for $!is_closed in the Channel, but, if the Channel is not closed, it does nothing rather than emitting a Nil. |
From @zoffixznetStill present in rakudo de5d9e: <Zoffix> m: my $c = Channel.new; my $s = $c.Supply; $s.tap: { say "got " ~ $_ }; for 1,2,Nil,3 { say "emit " ~ $_.perl; $c.send($_) }; sleep 0.1 |
From @zoffixznetOn further inspection, it would appear `Nil` is not a valid value to send through the Channel. For example, `.poll` uses it to signal that there are no values present in the Channel. -- |
The RT System itself - Status changed from 'new' to 'open' |
@zoffixznet - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#127648 (status was 'rejected')
Searchable as RT127648$
The text was updated successfully, but these errors were encountered: