is Supplier
This is a factory for live Supply-type objects, and it provides the mechanism for emitting new values onto the supplies, whereby values are kept when no consumer has tapped into the Supply. Any tapping will consume the already stored and future values.
Starting a preserving Supply and consuming its values after it is done:
my = Supplier::Preserving.new;start for ^3sleep 2;reactsay „also done after s“
Will output:
done after 0.0638467s 0 1 2 also done after 4.0534119s
Methods§
method new§
method new()
The Supplier constructor.