FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

AsynchronousProgramming/JavaScript at master · HowProgrammingWorks/AsynchronousProgramming · GitHub

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

AsynchronousProgramming

See four examples and execute them. Create asynchronous analogues of Array.forEach

Parallel execution

// Array of functions
let fns = [readConfig, selectFromDb, getHttpPage, readFile];

// Call example
parallelAsync(fns, () => { console.log('Done'); });

// Implementation
function parallelAsync(fns, done) {
  // TODO: implement parallel ecexution
};

Sequential execution

// Array of functions
let fns = [readConfig, selectFromDb, getHttpPage, readFile];

// Call example
sequentialAsync(fns, () => { console.log('Done'); });

// Implementation
function sequentialAsync(fns, done) {
  // TODO: implement sequential execution
};

Back | FazBrowse Home | New Git URL