Multithreading in java learning
•
Java
0x00 Preface
In a tool development, if the tool needs to continuously perform the same action or request, using single thread is very slow. Take a directory scanner as an example. For example, we need to develop a directory scanner. There are 10000 dictionaries in our dictionary, and only one thread initiates HTTP requests. This speed is very slow. However, if we use multiple threads, four threads, and each thread requests 2500 dictionaries, our time can be shortened by four times.
0x01 multithreading concept
Threads and processes
Before understanding multithreading, we must first understand the difference between multithreading and multiprocessing.
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码