method on-close
1 | class Supply |
1.1 | (Supply) method on-close |
Documentation for method on-close
assembled from the following types:
class Supply
From Supply
(Supply) method on-close
method on-close(Supply: --> Supply)
Returns a new Supply
which will run &on-close
whenever a Tap of that Supply
is closed. This includes if further operations are chained on to the Supply
. (for example, $supply.on-close(&on-close).map(*.uc)
). When using a react
or supply
block, using the CLOSE phaser is usually a better choice.
my = Supplier.new;my = .Supply.on-close().tap(-> ,done => ,quit => -> ,);.emit('Raku');.close; # OUTPUT: «Tap closed»