Promise resolved when all data poured and sank.
await withInflow(async withDrainInflow => {
await withDrain(async initialValue => {
// Sink the value poured by just opened drain.
// ...some asynchronous code...
await withDrainInflow(async () => {
await withDrain(async nextValue => {
// Sink the value from previously opened drain.
});
});
});
});
Inflows could be nested within each other. The nested inflow inherits all drains opened in enclosing one. It may override any of them, as well as open new ones.
Starts named inflow of drains.
Promise resolved when all data poured and sank.
Generated using TypeDoc
Starts inflow of drains.
Each drain opened within synchronous part of the given
sink
can pour data again downstream. For that, call the drain without arguments within poured faucet's sink.