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
duplicate triggers of .act when using parallel greps on an IO::Notification.watch_path supply #4489
Comments
From muraiki@pair.comWhen two greps are used in parallel on one supply produced by my $paths = IO::Notification.watch_path('.')\ my $watch = $paths.grep(* ~~ /watchfile/)\ my $never = $paths.grep(* ~~ /shouldneverexecute/)\ sleep; Output: got file change: "watchfile" The expected output should be only a single line, not two. I also I tried this with a plain supply and could not reproduce the problem: my $s = Supply.new(); my $watch = $s.grep(* ~~ /1/)\ my $never = $s.grep(* ~~ /shouldneverexecute/)\ $s.emit(1); sleep; This outputs "got one" a single time, as expected. Perl6 version info: 2015.07.1-161-gf7cfe9d built on MoarVM version |
From muraiki@pair.comA better description for this bug, now that I have a better idea of what In Reactive Extensions with cold observables, I could see this |
From andrew@egeler.usOn Wed Aug 26 08:19:35 2015, muraiki@pair.com wrote:
I think this is a bug in Supply.unique: 22:38 retupmoca m: my $s = Supply.new; my $s2 = $s.unique(:as({$_}), :expires(5)); $s2.act({say $_}); $s.emit(1); $s2.act({ say $_ * 2}); $s.emit(2); # re: #125908 |
The RT System itself - Status changed from 'new' to 'open' |
From @dogbert17On Tue, 03 Nov 2015 08:54:16 -0800, root+bitcard@retupmoca.com wrote:
$ perl6 -v tried the original code example and it now only produces one event, i.e. got file change: "watchfile" It was suspected that the real problem was a bug in Supply.unique, and the I tried the following: perl6 -e 'my $x = Supplier.new; my $s = $x.Supply; my $s2 = $s.unique(:as({$_}), :expires(5)); $s2.act({say $_}); $x.emit(1); $s2.act({ say $_ * 2}); $x.emit(2);' Had to rewrite the example since the api for supplies has changed since the Should possibly be marked as TESTNEEDED |
Migrated from rt.perl.org#125908 (status was 'open')
Searchable as RT125908$
The text was updated successfully, but these errors were encountered: