CancellationToken in Swift, modelled after the .NET version