Modern Concurrency on Apple Platforms: Using async/await with Swift

Автор: literator от 15-11-2022, 16:35, Коментариев: 0

Категория: КНИГИ » ПРОГРАММИРОВАНИЕ

Modern Concurrency on Apple Platforms: Using async/await with SwiftНазвание: Modern Concurrency on Apple Platforms: Using async/await with Swift
Автор: Andres Ibañez Kautsch
Издательство: Apress
Год: 2023
Страниц: 213
Язык: английский
Формат: pdf (true), epub
Размер: 10.2 MB

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.

Concurrency is a topic a lot of developers find scary. And for good reason. Concurrency is probably one of the most complicated topics in the world of programming. When you look at it from a very high level, concurrency allows us to do a lot of work at the same time. Sometimes related, sometimes unrelated. The definition is simple, but as a programmer, it is hard to reason about concurrent programs. We learn to write code that can be read from top to bottom, and code usually makes sense when you read it in such a manner. In fact, the way developers reason about code is not too different to how non-programmers reason about a cooking recipe. Humans can understand anything they read if it is structured and makes sense.

But the very nature of concurrency breaks this top-to-bottom reading flow. Not only do we need to reason about concurrency differently, but we also need to keep in mind other factors that make it harder, such as shared mutable data, locks, threads…. Concurrency is naturally very complicated, especially when dealing with lower-level tools.

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

Скачать Modern Concurrency on Apple Platforms: Using async/await with Swift








Нашел ошибку? Есть жалоба? Жми!
Пожаловаться администрации
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.