Re: [swift-evolution] [Concurrency] async/await + actors: cancellation

2017-08-19 Thread Jan Tuitman via swift-evolution
Hi Joe, Thanks for the answers so far! Abrupt cancellation is indeed not a good idea, but I wander if it is possible on every place where “await” is being used, to let the compiler generate code which handles cancellation, assuming that can be cheap enough (and I am not qualified to judge if

Re: [swift-evolution] [Concurrency] async/await + actors: cancellation

2017-08-18 Thread Joe Groff via swift-evolution
> On Aug 17, 2017, at 11:53 PM, Jan Tuitman via swift-evolution > wrote: > > Hi, > > > After reading Chris Lattners proposal for async/await I wonder if the > proposal has any way to cancel outstanding tasks. > > I saw these two: > > @IBAction func buttonDidClick(sender:AnyObject) { > //

Re: [swift-evolution] [Concurrency] async/await + actors: cancellation

2017-08-18 Thread David P Grove via swift-evolution
> From: Jan Tuitman via swift-evolution > To: swift-evolution@swift.org > Date: 08/18/2017 02:54 AM > Subject: [swift-evolution] [Concurrency] async/await + actors: cancellation > Sent by: swift-evolution-boun...@swift.org > > Hi, > > > After reading Chris Lattn

[swift-evolution] [Concurrency] async/await + actors: cancellation

2017-08-17 Thread Jan Tuitman via swift-evolution
Hi, After reading Chris Lattners proposal for async/await I wonder if the proposal has any way to cancel outstanding tasks. I saw these two: @IBAction func buttonDidClick(sender:AnyObject) { // 1 beginAsync { // 2 let image = await processImage() imageView.image = image } /