ObjC-CollapsingFutures icon indicating copy to clipboard operation
ObjC-CollapsingFutures copied to clipboard

Variant of cancel token source with cancel-old-token-return-new-token

Open Strilanc opened this issue 11 years ago • 0 comments

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.

Strilanc avatar Mar 01 '14 04:03 Strilanc