Interview asked Question, how many threads are suitable to create?
What scenarios does concurrent programming apply to? If the reason why you choose multi-threading is a "fast" word, there will not be so many moths in the interview. Have you ever asked yourself Is concurrent programming fast in all scenarios? Knowing it is fast, why is it fast? How to measure? To know the answers to these two questions, we need an analysis process from [qualitative] to [quantitative] Using multi-threading is to maximize the running speed of the program by setting the correct number of threads in the correct scene (I feel that you haven't said anything). Translating this sentence to the hardware level is to make full use of CPU and I/O utilization. The correctness of the two is guaranteed, and the purpose of maximizing the utilization of CPU and I/O can be achieved. The key is, how to do two [correct]? When talking about specific scenes, we must show our professionalism. Give you two noun buff bonuses. CPU-intensive programs I/O-intens...