Is concurrent programming difficult to learn?
First of all, the difficulty is certain. Because this involves many aspects of knowledge such as operating system, CPU, memory, etc., if you lack a certain piece, it is naturally difficult to understand. Secondly, the difficulty of learning may also vary from person to person. From my experience, many people always like to start from the point when learning concurrent programming, hoping to find the law or essence from the point, but finally put themselves Fainted.
In order to make your knowledge more systematic and comprehensive, you can finally solve various concurrency problems handily, and at the same time apply this knowledge to other programming languages, today I recommend a set of concurrent programming family bucket materials for everyone .
It includes four PDF documents and interview questions, which is really really good !
Document 1: Concurrent Programming
Main Directory:
1. Overview
2. Processes and threads
Contents of this chapter: concepts of processes and threads, concepts of parallelism and concurrency, basic applications of threads
3. Java threads
Contents of this chapter: create and run threads, view threads, thread API, thread status
4. Management of shared model
Contents of this chapter: sharing issues, synchronized, thread safety analysis, Monitor, wait/notify, thread state transition, liveness, Lock
5. Shared model memory content in this chapter
The monitor explained in the previous chapter is mainly concerned with ensuring the atomicity of the critical section code when accessing shared variables
In this chapter, we further study the [visibility] problem of shared variables among multiple threads and the [orderness] problem of multiple instructions execution
6. Shared model without lock
This chapter content: CAS and volatile, atomic integer, atomic reference, atomic accumulator, Unsafe
7. Immutability of the shared model
Contents of this chapter: the use of immutable classes, immutable class design, stateless class design
8. Tools for sharing models
Document 2: Concurrent Programming-Patterns
Document 3: Concurrent Programming-Application
Document 3: Concurrent Programming-Principles
Document 4: Interview
Write at the end
Focus on learning those constant underlying knowledge
Due to space reasons, if there is a need to program the complete document of the family bucket concurrently, after forwarding + following the editor, just check the picture below.