diff options
author | Alexander Early <alexander.early@gmail.com> | 2015-07-05 17:37:28 -0700 |
---|---|---|
committer | Alexander Early <alexander.early@gmail.com> | 2015-07-05 17:37:28 -0700 |
commit | 3b3c6f4be2785d8533892a72493c3f10d6e5f6cc (patch) | |
tree | 4cc808de06929456e7dd99cbed0247f83597e81b | |
parent | 6ef3167ea5e37a0e9c9589102fb0a36f7eb37ba4 (diff) | |
download | async-3b3c6f4be2785d8533892a72493c3f10d6e5f6cc.tar.gz |
added clarifications about parallel. Cwqloses #732
-rw-r--r-- | README.md | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -749,6 +749,8 @@ callback, the main `callback` is immediately called with the value of the error. Once the `tasks` have completed, the results are passed to the final `callback` as an array. +**Note:** `parallel` is about kicking-off I/O tasks in parallel, not about parallel execution of code. If your tasks do not use any timers or perform any I/O, they will actually be executed in series. Any synchronous setup sections for each task will happen one after the other. JavaScript remains single-threaded. + It is also possible to use an object instead of an array. Each property will be run as a function and the results will be passed to the final `callback` as an object instead of an array. This can be a more readable way of handling results from |