diff options
author | Graeme Yeates <yeatesgraeme@gmail.com> | 2016-07-06 18:25:57 -0400 |
---|---|---|
committer | Graeme Yeates <yeatesgraeme@gmail.com> | 2016-07-06 18:25:57 -0400 |
commit | 3216dd903c1aa31958c1c41a45d9cacadaac524a (patch) | |
tree | b6982edac83d5e204d7aec0abb18af3e05958a96 /CHANGELOG.md | |
parent | 4a47e5d3e17220982eae226e29980a49f64c02c2 (diff) | |
download | async-3216dd903c1aa31958c1c41a45d9cacadaac524a.tar.gz |
Update changelog
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r-- | CHANGELOG.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d46738b..a049ac5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,10 @@ There were several cases where Async accepted some functions that did not strict Another theme is performance. We have eliminated internal deferrals in all cases where they make sense. For example, in `waterfall` and `auto`, there was a `setImmediate` between each task -- these deferrals have been removed. A `setImmediate` call can add up to 1ms of delay. This might not seem like a lot, but it can add up if you are using many Async functions in the course of processing a HTTP request, for example. Nearly all asynchronous functions that do I/O already have some sort of deferral built in, so the extra deferral is unnecessary. The trade-off of this change is removing our built-in stack-overflow defense. Many synchronous callback calls in series can quickly overflow the JS call stack. If you do have a function that is sometimes synchronous (calling its callback on the same tick), and are running into stack overflows, wrap it with `async.ensureAsync()`. +Another big performance win has been re-implementing `queue`, `cargo`, and `priorityQueue` with [doubly linked lists](https://en.wikipedia.org/wiki/Doubly_linked_list) instead of arrays. This has lead to queues being an order of [magnitude faster on large sets of tasks](https://github.com/caolan/async/pull/1205). + +We also have a slick new [site for docs](https://caolan.github.io/async/). Special thanks to [**hargasinski**](https://github.com/hargasinski) for his work converting our old docs to `jsdoc` format and implementing the new website. Also huge ups to [**ivanseidel**](https://github.com/ivanseidel) for designing our new logo. It was a long process for both of these tasks, but I think these changes turned out extraordinary well. + ## New Features - Async is now modularized. Individual functions can be `require()`d from the main package. (`require('async/auto')`) (#984, #996) @@ -30,6 +34,7 @@ Another theme is performance. We have eliminated internal deferrals in all cases - Added `reflect` and `reflectAll`, analagous to [`Promise.reflect()`](http://bluebirdjs.com/docs/api/reflect.html), a wrapper for async tasks that always succeeds, by gathering results and errors into an object. (#942, #1012, #1095) - `constant` supports dynamic arguments -- it will now always use its last argument as the callback. (#1016, #1052) - `setImmediate` and `nextTick` now support arguments to partially apply to the deferred function, like the node-native versions do. (#940, #1053) +- `auto` now supports resolving cyclic dependencies using [Kahn's algorithm](https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm) (#1140). - Added `autoInject`, a relative of `auto` that automatically spreads a task's dependencies as arguments to the task function. (#608, #1055, #1099, #1100) - You can now limit the concurrency of `auto` tasks. (#635, #637) - Added `retryable`, a relative of `retry` that wraps an async function, making it retry when called. (#1058) @@ -47,9 +52,15 @@ Another theme is performance. We have eliminated internal deferrals in all cases - `filter`, `reject`, `some`, `every`, and related functions now expect an error as the first callback argument, rather than just a simple boolean. Pass `null` as the first argument, or use `fs.access` instead of `fs.exists`. (#118, #774, #1028, #1041) - `{METHOD}` and `{METHOD}Series` are now implemented in terms of `{METHOD}Limit`. This is a major internal simplification, and is not expected to cause many problems, but it does subtly affect how functions execute internally. (#778, #847) - `retry`'s callback is now optional. Previously, omitting the callback would partially apply the function, meaning it could be passed directly as a task to `series` or `auto`. The partially applied "control-flow" behavior has been separated out into `retryable`. (#1054, #1058) +- The `q.tasks` array has been renamed `q._tasks` and is now implemented as a doubly linked list (DLL). Any code that used to interact with this array will need to be updated to either use the provided helpers or support DLLs (#1205). - The timing of the `q.saturated()` callback in a `queue` has been modified to better reflect when tasks pushed to the queue will start queueing. (#724, #1078) - Dropped support for Component, Jam, SPM, and Volo (#1175, ##176) +## Bug Fixes + +- Improved handling of no dependency cases in `auto` & `autoInject` (#1147). +- Fixed a bug where the callback generated by `asyncify` with `Promises` could resolve twice (#1197). + ## Other - Added `someSeries` and `everySeries` for symmetry, as well as a complete set of `any`/`anyLimit`/`anySeries` and `all`/`/allLmit`/`allSeries` aliases. |