Allen iOS Concurrency - Understanding DispatchQueue and OperationQueue
Concurrency Programming - Covers the concepts of synchronous and asynchronous programming required in iOS development, as well as everything related to GCD and Operation, which are extensions of those concepts.

News
5 articles
We have released the Swift Concurrency (Part-2) course.
Hello! This is Alan.
We've released Part 2 of the much-awaited Swift Concurrency lecture.Lecture link: https://inf.run/rFuFe
For those who want to learn more deeply about Swift Concurrency, I think this lecture will be very helpful. (It is not a complete lecture yet, but 70% of the lecture content has been uploaded, and the remaining 30% will be uploaded by the end of March.)
The first 100 people will receive a 50% discount on the course , and the next 200 people will receive a 45% discount , so if you are interested in purchasing the course, it would be a good idea to quickly apply for the first-come, first-served opportunity.
(If you go to the lecture page, there is a separate link for first-come, first-served discount benefits at the top.. Please check it and click on the link to purchase to receive the discount benefit.🙏🏻)Hello! This is Alan. :)
It's been a while since I posted any news.
Thank you for listening to my lecture.. I would like to introduce you to the blog of "sujinnaljin" who has carefully reinterpreted the contents of my lecture in her own style.. It's been a while since I've given you some news. :)
Because you write so well and interestingly, I also enjoyed reading all the content. Haha
I'll send you the table of contents and link below! You've asked a lot of questions and studied a lot of additional content yourself... You've organized a lot of content! I think it would be good to go in and take a look while reviewing the GCD content! ㅎㅎ
(And, since there are many other iOS-related contents other than GCD that are written in a really easy and fun way, I recommend you refer to them.)
["sujinnaljin"'s blog - GCD related table of contents and links][iOS] Starting GCD step by step — 1: This time, I really want to understand GCD..🥂
[iOS] GCD Step by Step — 2: Let’s learn about GCD and Operation
[iOS] GCD Getting Started Step by Step — 3: Let’s Learn about sync vs async
[iOS] GCD Step by Step — 4: Let’s learn about Serial vs Concurrent
[iOS] How DispatchQueue and task behave when QoS are different: GCD, starting step by step — Part 5
[iOS] Getting Started with GCD Step by Step — 6: Let’s Learn About Precautions When Using GCD
[iOS] GCD Getting Started Step by Step — 7: Let’s Learn About the Concept of Dispatch Group
[iOS] GCD Getting Started Step by Step — 9: Let’s Learn About DispatchWorkItem
[iOS] GCD Getting Started Step by Step — 10: Let’s Learn About DispatchSemaphore
[iOS] GCD Getting Started Step by Step — 14: Let’s Learn About Deadlock and How to Solve It
[iOS] GCD Getting Started Step by Step — 15: Let’s learn about priority inversion and how to solve it
Also, there are some updates planned for the lecture content around July. :)
Regarding the contents such as Run Loop / Physical Thread (Parallel) vs Software Thread (Concurrency) / Block - NonBlock / async, await, etc.. I have already organized the materials.., but I am currently filming a lecture related to Swift grammar and it is scheduled to be released.. Once the filming and uploading of that lecture is complete, I plan to update this lecture as well!
Then I promise to reward you with good lecture content and see you again soon :)
- Alan Dream -Hello. It's been a while since I've brought you some news.
It's nothing else,
There is a good article on the question Why should you update your UI on the main thread?, so I created a translation and would like to share it with you.
I hope this will be of some help to you.
(Original source of the article)
https://medium.com/@duwei199714/ios-why-the-ui-need-to-be-updated-on-main-thread-fd0fef070e7f
(Interpretation PDF file)
https://drive.google.com/file/d/1dFw6sJsxV-huK3BoHXgDq-7rXy9yBq9l/view?usp=sharing
To summarize briefly,
1) All properties of UIKit cannot be designed to be thread-safe because it can cause performance degradation such as slowdown . (It is Apple's intention to design it not to be thread-safe.)
2) The main runloop is designed to update the view simultaneously through the View Drawing Cycle , which manages the update of the view. However, when a background thread (not the main thread) performs such operation with its own runloop, the view may behave arbitrarily. (For example, For example, when you rotate the device, you may not be able to do the same thing where the view's layout is rearranged.)
3) iOS has a rendering process for drawing images (CoreAnimation -> RenderServer -> GPU -> Display) , and if changes in each view are sent to the GPU from multiple threads, the GPU has to interpret each piece of information, which can slow down or be inefficient.
4) Although there are asynchronous UI frameworks developed by Facebook called Texture and ComponentKit, they ensure that the View Drawing Cycle is updated simultaneously on the main thread at the appropriate timing in a similar manner.
About this much This is the content. In fact, this was an article that made me think again about whether, for similar reasons as mentioned above, not only iOS but also Windows and other OSes , UI updates are structurally limited to the main thread .
It's just a topic you might think about once in a while.. I hope it helps a little bit ^^
thank you .
Hello, this is Alan.
First of all, thank you for taking the iOS Concurrency Programming course. :)
Recently, two people have posted good questions in the Q&A section.
I have given you an answer.. and there are some errors in the comments.. and I would like to clarify the explanation a bit more.
Re-record and edit the video of that part (replacing the existing video file)
I uploaded it, and I also uploaded the code and PDF file after slightly modifying them . If you want to download the code or PDF file again,
I thought it would be good to post some news.
(Just for reference, if you take a look at the two questions and my answers, it might help you study a little.^^)
The relevant part
3. Things to be careful of when using dispatch queue (GCD) in GCD
2) Notes on the sync method . That is, why you should not send from the current queue (async) to the current queue (sync).
This part is covered a little more clearly.
(Below is an image capture of the page I added to the lecture notes PDF.)

I have added the above content to the PDF file, so you can use it for reference.
Yes.. If there is anything that requires additional explanation or you do not understand, please feel free to ask questions at any time and I will do my best to answer.
Thank you always. :)
Please feel free to ask questions at any time, and we will do our best to answer them.
Thank you. ^^

