Update README.md

This commit is contained in:
AJ ONeal 2013-09-02 17:38:53 -05:00
parent 9102a54184
commit 5a5e0397d7
1 changed files with 6 additions and 6 deletions

View File

@ -81,10 +81,10 @@ Both Asynchronous and Synchronous versions are provided.
### Sync ### Sync
Note: Due to changes in EventEmitter, Note: You **can't use EventEmitter** if you want truly synchronous walker
I don't think it's possible to create a truly synchronous walker, (although it's synchronous, it appears not to be due to the use of `process.nextTick()`).
but I believe it will still finish in a single event loop as-is
(due to changes in process.nextTick). Instead **you must use `options.listeners`** for truly synchronous walker.
```javascript ```javascript
(function () { (function () {
@ -96,8 +96,8 @@ but I believe it will still finish in a single event loop as-is
, walker , walker
; ;
# To be truly synchronous in the emitter and maintain a compatible api, // To be truly synchronous in the emitter and maintain a compatible api,
# the listeners must be listed before the object is created // the listeners must be listed before the object is created
options = { options = {
listeners: { listeners: {
names: function (root, nodeNamesArray) { names: function (root, nodeNamesArray) {