Re: [swift-evolution] [Concurrency] Fixing race conditions in async/await example

2017-08-23 Thread Maxim Veksler via swift-evolution
I think that the solution you are describing is how RxSwift (ReactiveX) solves this problem. I believe Rx, like many other higher level abstractions would benefit from async, actors behind the scenes, as an implementation detail. ‫בתאריך יום ד׳, 23 באוג׳ 2017 ב-20:41 מאת ‪Joe Groff via

Re: [swift-evolution] SE-184 Improved Pointers

2017-08-23 Thread Taylor Swift via swift-evolution
done: https://github.com/apple/swift-evolution/pull/744 On Wed, Aug 23, 2017 at 1:56 PM, Andrew Trick wrote: > Kelvin, > > Please resubmit a clean swift-evolution PR now. I personally think this is > ready for formal review given that all feedback was positive and all issues >

[swift-evolution] [Concurrency] Async/Await

2017-08-23 Thread Howard Lovatt via swift-evolution
Hi All, Really glad that concurrency is on the table for Swift 5. I am not sure if async/await are worth adding, as is, to Swift because it is just as easy to do with a library function - in the spirit of Swift 5, see `Future` library code below that you can play with and run. If a `Future`

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

2017-08-23 Thread Adam Kemp via swift-evolution
> On Aug 23, 2017, at 4:28 PM, Marc Schlichte via swift-evolution > wrote: > > >> Am 23.08.2017 um 12:29 schrieb Thomas via swift-evolution >> >: >> >> >>> On 23 Aug 2017, at 11:28, Thomas via

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

2017-08-23 Thread Marc Schlichte via swift-evolution
> Am 23.08.2017 um 12:29 schrieb Thomas via swift-evolution > : > > >> On 23 Aug 2017, at 11:28, Thomas via swift-evolution >> > wrote: >> >> 1. What happens to the actor's queue when the body of a (non

[swift-evolution] [Concurrency] Passing classes between actors

2017-08-23 Thread Jonathan Hull via swift-evolution
There seems to be an open question about how to handle passing mutable state between actors (or possibly just disallowing it). I have a germ of an idea, and I thought I would share in case it triggers a more fully formed idea in someone. We should have an extremely easy way to wrap a bit of

Re: [swift-evolution] SE-184 Improved Pointers

2017-08-23 Thread Andrew Trick via swift-evolution
Kelvin, Please resubmit a clean swift-evolution PR now. I personally think this is ready for formal review given that all feedback was positive and all issues brought up during review have been addressed. -Andy > On Aug 22, 2017, at 12:59 PM, Michael Ilseman wrote: > >

Re: [swift-evolution] [Concurrency] Fixing race conditions in async/await example

2017-08-23 Thread Joe Groff via swift-evolution
> On Aug 19, 2017, at 4:56 AM, Jakob Egger via swift-evolution > wrote: > > I've read async/await proposal, and I'm thrilled by the possibilities. Here's > what I consider the canonical example: > @IBAction func buttonDidClick(sender:AnyObject) { > beginAsync { >

Re: [swift-evolution] [Concurrency] do async

2017-08-23 Thread John McCall via swift-evolution
> On Aug 23, 2017, at 1:16 PM, Joe Groff via swift-evolution > wrote: > >> >> On Aug 21, 2017, at 11:23 PM, Jonathan Hull via swift-evolution >> wrote: >> >> I have seen a lot of examples which use both do and beginAsync: >> >>

Re: [swift-evolution] [Concurrency] do async

2017-08-23 Thread Joe Groff via swift-evolution
> On Aug 21, 2017, at 11:23 PM, Jonathan Hull via swift-evolution > wrote: > > I have seen a lot of examples which use both do and beginAsync: > > beginAsync { > do { > try await foo() > } catch let e { >

Re: [swift-evolution] [Pitch] Introducing role keywords to reduce hard-to-find bugs

2017-08-23 Thread Douglas Gregor via swift-evolution
> On Jun 16, 2017, at 11:21 AM, Tino Heth via swift-evolution > wrote: > > The described problem might be one of the most famous itches of the language, > but imho the bar for new keywords* should be higher than that — and there are > alternatives: > > First, I

Re: [swift-evolution] pure functions

2017-08-23 Thread Joe Groff via swift-evolution
> On Aug 18, 2017, at 12:10 PM, Chris Lattner via swift-evolution > wrote: > > Splitting this out from the concurrency thread: > >> >> On Aug 18, 2017, at 6:12 AM, Matthew Johnson wrote: >>> On Aug 17, 2017, at 11:53 PM, Chris Lattner

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

2017-08-23 Thread Andre via swift-evolution
Hi Chris, This looks amazing(!) … I am really looking forward to the end result whatever that may be, because I know it will be awesome. Im really excited and a lot raced though my mind while I read it... ——— Part 1: Async/await let dataResource = await

Re: [swift-evolution] [Concurrency] Async/Await

2017-08-23 Thread Joe Groff via swift-evolution
> On Aug 23, 2017, at 12:06 AM, Martin Waitz wrote: > > Hello, > >> Am 22.08.2017 um 18:32 schrieb Joe Groff via swift-evolution >> >: >> The feature provides general delimited continuations. You could write an

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

2017-08-23 Thread Thomas via swift-evolution
> On 23 Aug 2017, at 11:28, Thomas via swift-evolution > wrote: > > 1. What happens to the actor's queue when the body of a (non void-returning) > actor method awaits away on some other actor? Does it suspend the queue to > prevent other messages from being

Re: [swift-evolution] (core library) modern URL types

2017-08-23 Thread Jakob Egger via swift-evolution
I would absolutely love to see an API like AbsolutePath / RelativePath for file system operations! > On 22. Aug 2017, at 21:02, Dave DeLong via swift-evolution > wrote: > > I suppose, if you squint at it weirdly. > > My current Path API is a “Path” protocol, with

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

2017-08-23 Thread Thomas via swift-evolution
Just wanted to sum up my actors interrogation here: 1. What happens to the actor's queue when the body of a (non void-returning) actor method awaits away on some other actor? Does it suspend the queue to prevent other messages from being processes? It would seem to be the expected behavior but

Re: [swift-evolution] [Concurrency] do async

2017-08-23 Thread Georgios Moschovitis via swift-evolution
Looks much cleaner to me! ___ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution

Re: [swift-evolution] [Concurrency] Async/Await

2017-08-23 Thread Martin Waitz via swift-evolution
Hello, > Am 22.08.2017 um 18:32 schrieb Joe Groff via swift-evolution > : > The feature provides general delimited continuations. You could write an > IteratorProtocol-conforming interface over a coroutine like this: > > private func yield(_ value: T) async -> Void

Re: [swift-evolution] Preparing Swift compiler stage reentrancy in preparation for "constexpr"

2017-08-23 Thread Douglas Gregor via swift-evolution
> On Aug 19, 2017, at 12:27 PM, Daryle Walker via swift-evolution > wrote: > > [I’m not sure which list should cover this.] > > I once thought of having a “#protocols(SomeTypeOrProtocol)” that was a type > alias to a composition of all protocols the given