ObjC-CollapsingFutures
ObjC-CollapsingFutures copied to clipboard
Variant of cancel token source with cancel-old-token-return-new-token
One common use case for cancel tokens is "throw away all the old stuff, we have new orders". For example, when a browser browses to a new page it discards the old page.
Would have two methods (perhaps with shorter names): cancelCurrentAndReturnNewToken, currentToken. Perhaps also a cancelCurrentToken method.
Possible names: CancelTokenExchanger, SerialCancelTokenSource, RevolvingCancelTokenSource, ParenticidalCancelTokenSource.