- Http://www.linkedin.com/in/ptdecker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Control Flow 3 - Rate Limited Concurrent Execution of an Asynchronous Function | |
* | |
* Based on: | |
* - http://book.mixu.net/node/ch7.html | |
* - https://github.com/mixu | |
* | |
* Characteristics: | |
* - Runs a number of operations concurrently | |
* - Starts a limited number of operations concurrently (partial concurrency, full concurrency control) | |
* - No guarantee of order, only that all the operations have been completed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Control Flow 2 - Fully Concurrent Executions of a Function (not rate limited) | |
* | |
* Based on: | |
* - http://book.mixu.net/node/ch7.html | |
* - https://github.com/mixu | |
* | |
* Characteristics: | |
* | |
* - Runs a number of operations concurrently | |
* - Starts all async operations near simultaneously (full concurrency) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Control Flow 1 - Repetitive Serial Execution of an Asynchronous Function | |
* | |
* Based on: | |
* - http://book.mixu.net/node/ch7.html | |
* - https://github.com/mixu | |
* | |
* Revised to use "typeof(first_item) != 'undefined'" based upon comments from 'Israel' | |
* | |
* Characteristics: | |
* - Flow control construct 'series' is recursive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This addresses a problem with the 'net-watcher.js' example in Jim Wilson's | |
* "Node.js The Right Way" book when running his 'net-watcher.js' example under | |
* Ubuntu 14.04 (and probably some other *nixs too). | |
*/ | |
'use strict'; | |
const | |
fs = require('fs'), | |
net = require('net'), |
NewerOlder