I find a good tutorial with case examples written by Sebastian Seilund. Introduced control flows are:
- async.parallel([taskFunctions], finalCallback)
- async.series( [taskFunctions], finalCallback) *use when task functions depend on each other.
- async.forEach([collection], taskFunctionforEach, finalCallback)
- async.forEachLimit([collection], cocurrency, taskFunctionforEach, finalCallback) *use when only limited concurrencies are allowed for taskFunctionforEach)
- aysnc.forEachSeries([collection], taskFunctionforEach, finalCallback) *do the same to forEachLimit with the concurrency of 1.
- async.queue() and queue.drain() * use when handling steamed data from outside resources
And those flows (parallel, series, forEach) can be used in combination in a nested form.