2022/06/09 (1) 썸네일형 리스트형 198. Concurrency with Context Concurrency with Context 대부분의 경우 하나의 Context로도 부족함이 없지만, 처리량이 많아지는 경우 Background Context를 활용한 동시처리(Concurrency)가 요구될 수 있다. MainQueueConcurrencyType과 PrivateQueueConcurrencyType으로 구분되며, 각각 Main Thread와 Background Thread에서 작동한다. Concurrency Context를 구현할때의 주의점은 다음과 같다. Context는 Thread에 안전하지 않다. Context에서 일어나는 모든 작업은 Context를 생성한 Thread에서 진행하고, 완료해야 한다. 다른 Context로 ManagedObject를 전달할 수 없다. 구조적으로 불가능.. 이전 1 다음