3 ms·
It doesn't right now, you are dependent on grand central dispatch. Adding concurrency features to the language will be a focus in Swift 4. Here is a document d
by stepanhruda 10y ago
It doesn't right now, you are dependent on grand central dispatch. Adding concurrency features to the language will be a focus in Swift 4.
Here is a document describing the current state of concurrency in the language: https://github.com/apple/swift/blob/master/docs/proposals/Concurrency.rst https://github.com/apple/swift/blob/master/docs/proposals/Co...
- austinz 10y agoTo be clear, that document contains brainstorming by some core Swift team developers. It's neither implemented in Swift nor officially accepted as a guideline for future development.
- stevetrewick 10y ago"The implementations of the thread-safety layer, the thread verifier, and programs that use the three concurrency libraries are available in the concurrency git branch."
- austinz 10y ago"This is a proposal and not a plan of record." Not only that, the git feature branch, if it ever existed, doesn't anymore.
- stepanhruda 10y agoOops, thanks, I should've been clearer.
- stevetrewick 10y agoThanks, I'm going to have to take a long hard look at that and the repo. I've just spent a couple of weeks abstracting over async in Swift [0] and where I ended up looks a lot like that - to the point where some of the primitives have identical type sigs (mainly because the patterns used here are not novel - promise/future, async/await, etc). Be great to see this as a core language feature! At least now we can see stuff coming, I had just finished writing unit tests for my OAuth library when Apple rolled an implementation into iOS. [0] I'm aware of PromiseKit and co (and read a bunch of their sources), but I didn't feel like I had a good conceptual grasp on their implementation until I could create something similar and understand how it works and how to use it to solve my actual problems. Often I'll bin my own implementation afterward and use an extant library, so this is almost - but not entirely - quite unlike NIH. Edit:punctuation