merge method

MergedCancellationToken merge(
  1. CancellationToken other
)

Merges this CancellationToken with another to create a single token that will be cancelled when either token is cancelled.

When merging more than two tokens, use MergedCancellationToken directly.

Implementation

MergedCancellationToken merge(CancellationToken other) =>
    MergedCancellationToken([this, other]);