Modern Concurrency on Apple Platforms: Using Async/Await with Swift
暫譯: Apple 平台上的現代併發:使用 Swift 的 Async/Await

Kautsch, Andrés Ibañez

  • 出版商: Apress
  • 出版日期: 2022-11-15
  • 售價: $2,200
  • 貴賓價: 9.5$2,090
  • 語言: 英文
  • 頁數: 202
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1484286944
  • ISBN-13: 9781484286944
  • 相關分類: Apple Developer
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Build solid software with modern and safe concurrency features. Concurrency is one of the hardest problems in computer science. For years, computer scientists and engineers have developed different strategies for dealing with concurrency. However, the original concurrency primitives are complicated and difficult to understand, and even harder to implement.

Using the new async/await APIs in Swift, this book will explain how your code can abstract a lot of the complexity with a simpler interface so you never have to deal with concurrency primitives such as semaphores, locks, and threads yourself. This will allow you to write concurrent code that is easier to read, easier to write, and easier to maintain. These new APIs are deeply ingrained into Swift, offering compile-level features that will keep you from writing dangerous concurrent code.

You'll start by exploring why concurrency is hard to implement in a traditional system. Explaining the definition of concurrency and what its primitives are will help you understand why they are hard to use correctly. These concepts will become clearer as you work through the sample projects. The book's focus then shifts exclusively to the new APIs, helping you understand how the integration of the system with the language itself makes it easier for you to write concurrent code without overstepping the bounds of the concurrency safe zone.

By the end of the book, you'll have a solid foundation for working safely with concurrent code using the new async/await APIs.

What You'll Learn

  • Understand concurrency and its traditional problems
  • Work with the new async/await API and all its features, from the basic usage and await keywords, to task groups and async sequences.
  • Implement modern and safe concurrent code that you can start using right away

Who This Book Is For

Experienced iOS developers at a semi-senior or senior level. Knowledge on the Grand Central Dispatch is a bonus, but not required.


商品描述(中文翻譯)

建立穩固的軟體,利用現代且安全的併發特性。併發是計算機科學中最具挑戰性的問題之一。多年來,計算機科學家和工程師們開發了不同的策略來處理併發。然而,原始的併發原語複雜且難以理解,實現起來更是困難。

本書將使用 Swift 中的新 async/await API,解釋您的程式碼如何通過更簡單的介面抽象出許多複雜性,讓您不必親自處理像是信號量、鎖和執行緒等併發原語。這將使您能夠編寫更易於閱讀、編寫和維護的併發程式碼。這些新 API 深深根植於 Swift 中,提供編譯級的特性,幫助您避免編寫危險的併發程式碼。

您將首先探索為什麼在傳統系統中實現併發是困難的。解釋併發的定義及其原語將幫助您理解為什麼它們難以正確使用。隨著您進行範例專案,這些概念將變得更加清晰。接著,本書的重點將專注於新 API,幫助您理解系統與語言本身的整合如何使您更容易編寫併發程式碼,而不會超出併發安全區的範圍。

到本書結束時,您將擁有使用新 async/await API 安全處理併發程式碼的堅實基礎。

您將學到的內容:
- 理解併發及其傳統問題
- 使用新的 async/await API 及其所有特性,從基本用法和 await 關鍵字,到任務群組和 async 序列。
- 實現現代且安全的併發程式碼,您可以立即開始使用

本書適合對象:
經驗豐富的 iOS 開發者,處於半資深或資深級別。對 Grand Central Dispatch 的了解是加分項,但不是必需的。

作者簡介

Andrés "Andy" Ibañez started writing iOS apps as a young college student in 2011. His first introduction to concurrency programming and its common pitfalls was in an Operating Systems class that introduced the importance (and complexity) of writing concurrent code. Since then, he has studied how this problem is solved in Apple's platforms, including iOS. Andy has worked in institutions that make use of concurrent technologies to keep their services running for their costumers, including banks, applying the concepts to their mobile applications.

作者簡介(中文翻譯)

安德烈斯 '安迪' 伊巴涅茲(Andrés 'Andy' Ibañez)在2011年作為一名年輕的大學生開始撰寫iOS應用程式。他第一次接觸到並發程式設計及其常見陷阱是在一門操作系統課程中,該課程介紹了撰寫並發程式碼的重要性(和複雜性)。從那時起,他研究了在蘋果平台上(包括iOS)如何解決這個問題。安迪曾在利用並發技術的機構工作,以保持其服務為客戶運行,包括銀行,並將這些概念應用於他們的移動應用程式中。