- Mastering Concurrency in Python
- Quan Nguyen
- 329字
- 2021-06-10 19:23:57
Summary
You have now been introduced to the concept of concurrent and parallel programming. It is about designing and structuring programming commands and instructions, so that different sections of the program can be executed in an efficient order, while sharing the same resources. Since time is saved when some commands and instructions are executed at the same time, concurrent programming provides significant improvements in program execution time, as compared to traditional sequential programming.
However, various factors need to be taken into consideration while designing a concurrent program. While there are specific tasks that can easily be broken down into independent sections that can be executed in parallel (embarrassingly parallel tasks), others require different forms of coordination between the program commands, so that shared resources are used correctly and efficiently. There are also inherently sequential tasks, in which no concurrency and parallelism can be applied to achieve program speedup. You should know the fundamental differences between these tasks, so that you can design your concurrent programs appropriately.
Recently, there was a paradigm shift that facilitated the implementation of concurrency into most aspects of the programming world. Now, concurrency can be found almost everywhere: desktop and mobile applications, video games, web and internet development, AI, and so on. Concurrency is still growing, and it is expected to keep growing in the future. It is therefore crucial for any experienced programmer to understand concurrency and its relevant concepts, and to know how to integrate those concepts into their applications.
Python, on the other hand, is one of the most (if not the most) popular programming languages. It provides powerful options in most sub-fields of programming. The combination of concurrency and Python is therefore one of the topics most worth learning and mastering in programming.
In the next chapter, on Amdahl's Law, we will discuss how significant the improvements in speedup that concurrency provides for our programs are. We will analyze the formula for Amdahl's Law, discussing its implications and considering Python examples.
- 零基礎搭建量化投資系統:以Python為工具
- Getting started with Google Guava
- 信息可視化的藝術:信息可視化在英國
- Practical DevOps
- jQuery從入門到精通 (軟件開發視頻大講堂)
- 從Excel到Python:用Python輕松處理Excel數據(第2版)
- Unity 2D Game Development Cookbook
- Bootstrap 4 Cookbook
- HoloLens與混合現實開發
- .NET 4.0面向對象編程漫談:應用篇
- 深入淺出Python數據分析
- 物聯網系統架構設計與邊緣計算(原書第2版)
- Visual C++開發寶典
- Java從入門到精通(視頻實戰版)
- Zend Framework 2 Cookbook