javascript - Nake number of synchronous ajax calls in the same time -


is there way make number of synchronous ajax call in same time? lets have number of ajax calls have no dependency of each other. want them run in same time can't use asynchronous calls because of reason.

what think want - make ajax calls in parallel , make action.

so need use async operations in parallel option - sync.js

async operations in parallel -

http://alexeypetrushin.github.io/synchronize/docs/index.html

var sync = require('synchronize')  function read(a, cb) {   settimeout(function(){     cb(null, a)   }, 1000) }  // runs in parallel sync.fiber(function() {   sync.parallel(function() {     // must call defer() manually within     // parallel operation.     read(1, sync.defer())     read(2, sync.defer())   });   var results = sync.await()   // results contains [1,2] }); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -