A screencast on time-based prefixing in Combine

(Assumed audience: folks with some working knowledge of Combine.)



The test expectations have since been swapped out for Point-Free’s TestScheduler implementation.


While PR’ing the operator, I looked into whether or not the prefix(1) safety net is needed and…it isn’t!


Combine uses back pressure to request a single value from untilOutputFrom and the subsequent finished event cancels everything out from there.

To check this, we can spin up a Playground:

(Gist permalink.)

I recorded my first screencast slash lecture slash live-coding episode thing!

In it—and from David’s mentioning in iOS Folks’ #reactive channel—, I implement a time-based overload on Publisher.prefix, while talking through nuances like fusion, ConnectablePublisher, and TestScheduler.

(YouTube permalink.)

I hope this encourages folks to experiment with composed operators and, if they see fit, contribute to CombineExt.

⇒ “An operator fusion primer

⇒ “Multicasting, Publisher.share(replay:), and ReplaySubject

⇒ Entwine’s implementation of a TestScheduler type.

⇒ OpenCombine’s VirtualTimeScheduler.