Experiment JavaScript multithreading page 1/2 _ javascript skills

Source: Internet
Author: User
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.


  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.