subscribe(on:) vs receive(on:)
In this post, instead of looking into the basics of multi-threading with Combine, we are going to have a look at the difference between subscribe(on:) and receive(on:) specifically. We’re going to look at a typical subscription chain starting with a root publisher, a couple of operators, and a subscriber at the end. We’ll look into more diagrams and some example code of how subscribe(on:) and receive(on:) affect subscriptions. subscribe(on:) subscribe(on:) sets the scheduler on which you’d like the current subscription to be “managed” on. …