Subscription.cancel MUST respect the responsivity of its caller by returning in a timely manner, MUST be idempotent and MUST be thread-safe.
mentions thread-safety and also links the keyword to it's definition in this context, which mentions "async".
Can be safely invoked synchronously, or asychronously, without requiring external synchronization to ensure program correctness.
The rule seems to contradict other rules, like:
A Subscriber MUST ensure that all calls on its Subscription's request and cancel methods are performed serially.
Subscription.request and Subscription.cancel MUST only be called inside of its Subscriber context.
And lastly the "MUST be thread-safe" doesn't equally apply to 'Subscription.request'. Is this obsolete, or is my understanding wrong?
In practice, implementations of the Subscription methods end up thread-safe anyway.
Not sure if this is generally true as it depends on how a
Publisher is using a
As an example this
Subscription instance usage is such that an instance is only used by the associated
Subscriber and hence can assume serial access as required by rule 2.7