Thank you for the reference. it puzzle me a lot that Combine don't have a detailed specification. Yet I still have questions.
Combine does have some seemingly obscure and inconsistent rules, like
subscription.request(.none). But to me deinit and cancel are very clear and consistent. Every
Subscriber and inner subscriber in an operator appear to follow the same rule of
- When you receive a unneeded
Subscription, cancel it and drop it.
- If you don't need a
Subscriptionanymore, cancel it before nil it out.
- Never manually cancel a
The only place I see cancel on deinit is
PassthroughSubject. They are not
Therefore, I don't expect
AsyncPublisher.Iterator.Inner (which is a
Subscriber) to cancel its
Subscription on deinit. Am I missing something?