A utility to end a stream based on an external trigger.
Available on Stream<T>, provided by the TakeUntil extension
trigger