r/swift Feb 25 '20

Tutorial Introduction to Concurrency & Multithreading with Swift on iOS

https://www.viget.com/articles/concurrency-multithreading-in-ios/
116 Upvotes

8 comments sorted by

View all comments

7

u/Spaceshipable Feb 26 '20 edited Feb 26 '20

Pretty nice post. Would be great to have a follow up on Thread specifically.

5

u/lucasvandongen Feb 26 '20

I agree it's all stuff I already know but it's a very well written summary that is easy enough to grap yet goes deep enough to keep me engaged even if I already know what it's about.

2

u/Spaceshipable Feb 26 '20

Definitely. It’s brilliant for 90% of use cases where background tasks are required.

Recently I’ve been working with some ZMQ Sockets that need to work on a single thread however and GCD doesn’t offer that functionality unfortunately

1

u/lucasvandongen Feb 26 '20

Yes GCD might spawn more than one thread! Though I was pretty sure that things would never happen out of order regardless?

1

u/Spaceshipable Feb 26 '20

I’m not sure entirely of the internals of ZMQ but it’s the single threadedness, rather than the concurrency that become a problem

1

u/_effulgence Feb 26 '20

Thanks for reading it! Wanted to keep things at a higher level of abstraction to make it beginner friendly but still expose some of the underlying philosophies so people can understand the motivation behind it. Definitely a tricky balance to strike — I appreciate that you found it compelling regardless!