I have been working on ajax for the past two days. I found the ajax cache problem only when I used more. I have requested it many times and got the same result, I often want to do some other things at the same time as the request. I wonder if there is any way to use multithreading in javascript. I found the result on the Internet. I have been working on ajax for the past two days. I found the ajax cache problem only when I used more. I have requested it many times and got the same result, I often want to do some other things at the same time as the request. I wonder if there is any way to use multithreading in javascript. I found the result on the Internet.
The magic weapon is Concurrent. Thread, which is actually a js library. You can download the source code from the website. How can you use it?
Simple
Concurrent. thread. create (f, a1, a2 ,...) f. For the function to be called, a1 and a2 are the parameters of the function. In this way, a thread is created, and multiple threads can be created at the same time, and they will be executed at the same time, this library also provides many methods, similar to the Thread usage methods in other languages, such as Concurrent. thread. stop. Go to the website to learn more.