You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In role SimpleOpTappable, the method !cleanup uses a Perl 6 int in a lock-like fashion:
method !cleanup(int $cleaned-up is rw, $source-tap) {
if $source-tap && !$cleaned-up {
$cleaned-up = 1;
$source-tap.close;
}
}
This seems to be primarily tasked with ensuring that the &on-closed closure of the
composed supply is not run more than once. A lot of the places are protected by
serial supply locks, however that is not true in the case of the &on-closed of the
composite Supply, nor in the .on-closed simpleop, so an absolute guarantee of this
cannot be made between different closers of that Tap object, or between a single
closer and an emit/done/quit.
Maybe using Tap.new({ once self!cleanup($source-tap) }) instead would
prevent the need for $cleaned-up?
Migrated from rt.perl.org#127659 (status was 'new')
Searchable as RT127659$
The text was updated successfully, but these errors were encountered: