싱글코어 CPU > 계산 속도를 빠르게 채찍질해 단순히 클럭을 높이다보니 발열등 부작용 발생했다. 이를 해결하기 위해 코어의 수를 늘려 다수의 코어끼리 통신에 집중했다. 이렇게 멀티코어로 넘어오면서 단일 스레드의 성능에 대한 향상은 더뎌졌다. 스레드 > 인텔은 하이퍼 스레딩, AMD는 SMT 기술을 고안해내 하나의 코어 안에서 스레드를 여러개 만들어...
Async-let tasks >In the early days of computing, programs were hard to read because they were written as a sequence of instructions, where control-flow was allowed to jump all over the place. >You ...
1. Introduction > In iOS, the Main Thread runs the UI of your app, so every UI-related task (updating the view hierarchy, removing and adding views) mus take place in the main thread. > People ofte...
Task hierarchy >Structured tasks are created using async let and task groups, while unstructured tasks are created using Task and Task.detached. Structured tasks live to the end of the scope where t...
Actor 등장배경 > 위와 같이 value 프로퍼티를 비동기로 접근하면 데이터 경쟁 상황이 발생한다. 상황에 따라 첫번째 프린트 문에서 1 혹은 2가 출력되어 결과값을 예측할 수 없다. 만약 두 개의 비동기를 돌리더라도 연산 결과인 2를 확정짓고 싶다면 어떻게 해야할까? > 구조체를 사용하면 데이터 경쟁 문제를 해결할 수 있으나 상태를 공유하지 않는...