内容简介
This book is a must-have tutorial for software developers aiming to write concurrent programs in Scala, or broaden their existing knowledge of concurrency.This book is intended for Scala programmers that have no prior knowledge about concurrent programming, as well as those seeking to broaden their existing knowledge about concurrency. Basic knowledge of the Scala programming language will be helpful. Readers with a solid knowledge in another programming language, such as Java, should find this
AI简介
这是一本深度解析并发编程技巧和策略的权威指南,面向所有对并发编程感兴趣的Scala程序员。这本书不仅适合那些初次接触并发编程的读者,也适合那些想要扩展并发编程知识的资深程序员。
书中首先介绍了并发编程的重要性、争议、兴起以及其在多核处理器时代的重要地位。接着,作者深入探讨了创建和启动线程,线程创建、通信与死锁避免等并发编程的基本概念和技巧。书中还详细介绍了Executor和ExecutorService,原子操作与锁的概念理解,以及异步编程的基本概念等并发编程的高级主题。
书中还详细讲解了Futures和Promises,Futures的异常处理,以及Scala集合框架等并发编程的重要工具。此外,书中还深入探讨了使用 parallel collections的原因和优势,Futures和Event Streams的异同,以及Rx主题与顶层响应式编程等并发编程的高级主题。
书中还详细介绍了STM的优势和组成,Actor模型概述,以及Akka框架简介等并发编程的重要框架和模型。此外,书中还详细讲解了调试并发程序及性能分析的方法,以及分布式应用实例:远程文件浏览器等并发编程的实践项目。