Raywenderlich/Modern Concurrency in Swift
-
Chapter 4: Custom Asynchronous Sequences With AsyncStreamRaywenderlich/Modern Concurrency in Swift 2023. 1. 30. 20:07
Version Swift 5.5, iOS 15, Xcode 13 이전(previous) 장(chapters)에서 앱(apps)에 비동기(asynchronous) 코드(code)를 통합(integrate)하는 몇 가지(few) 다른(different) 방법을 배웠다(learned). 지금쯤이면(by now), async 함수(functions)를 호출(calling), 작성(writing)하고 비동기(asynchronous) 시퀀스(sequences)를 반복(iterating over)하는 것이 수월(comfortable)하기 바란다(hopefully). 이 장(chapter)에서는 AsyncStream을 사용하여 고유한 사용자 정의(custom) 비동기(async) 시퀀스(sequences)를 생성(cr..
-
Chapter 3: AsyncSequence & Intermediate TaskRaywenderlich/Modern Concurrency in Swift 2023. 1. 2. 17:40
Version Swift 5.5, iOS 15, Xcode 13 이 책 전체에서(throughout) 비동기(asynchronous) 프로그래밍(programming)과 관련한 개발을 더 쉽게 하기 위해 비동기(async) 시퀀스(sequences)를 사용할 것이다. 비동기(async) 시퀀스(sequences)를 사용하면, Swift 시퀀스(sequence)를 반복(iterating over)하는 것처럼 간단하게(as simple as) 비동기(asynchronous) 결과(results)를 사용할 수 있다. 1장(chapter), "Why Modern Swift Concurrency?"에서 이미(already) 비동기(async) 시퀀스(sequences)를 간략하게(briefly) 시도했지만(tri..
-
Chapter 2: Getting Started With async/awaitRaywenderlich/Modern Concurrency in Swift 2022. 12. 21. 18:27
Version Swift 5.5, iOS 15, Xcode 13 이제 Swift Concurrency가 무엇이고 왜 사용해야 하는지 알아보았으므로, 이 장(chapter)에서는 실제 async/await 구문(syntax)과 비동기(asynchronous) 실행(execution)을 조정(coordinates)하는 방법에 대해 자세히 살펴본다. 또한 Task 유형(type)과 이를 사용하여 새로운 비동기(asynchronous) 실행(execution) 컨텍스트(contexts)를 생성(create)하는 방법에 대해 알아본다. 하지만(though), 그 전에 새로운 async/await 구문(syntax)이 아닌 Swift 5.5 이전의 동시성(concurrency)을 배우는 데 잠시 시간을 할애(spe..
-
Chapter 1: Why Modern Swift Concurrency?Raywenderlich/Modern Concurrency in Swift 2022. 12. 15. 18:08
Version Swift 5.8, iOS 16, Xcode 14 Apple이 마지막으로 비동기(asynchronous) 프레임워크(framework)에 대한 큰 작업(big deal)을 한 것은 2009년 Mac OS X Snow Leopard와 함께 GCD(Grand Central Dispatch)가 출시(came out)되었을 때였다. GCD는 2014년에 출시(launch)된 Swift가 처음부터 동시성(concurrency)과 비동기성(asynchrony)을 지원하도록 도움(support for)이 되었지만, 그 지원(support)은 Swift(native)가 아니라 Objective-C의 요구 사항(needs)과 기능(abilities)을 중심으로 설계(designed)되었다. Swift는 해..