Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Ultimate Pro subscription. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it’s simply the best investment you can make in your development career.

Sharing Resources Pro

This video was last updated on Apr 13 2021

Publishers in Combine are usually passed by value, since they are structs; however, you can use the built in Combine operator share() to pass them by reference, establishing one true subscription and simply sharing the data with other subscribers as they come along. Want to wait until all of the subscribers are ready before starting the data flow? multicast() allows you to do just that, and start the data when you are ready.