Skip to content

Commit

Permalink
Moved the declaration of loadingQueue at the top.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed May 4, 2016
1 parent 8d17abb commit 86ed42a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions seneca.js
Expand Up @@ -236,6 +236,11 @@ function make_seneca (initial_options) {
// Create a new root Seneca instance.
var root = new Seneca()

// Create a loading queue to bootstrap safely
// every use, add and act done in the starting
// tick will be queued and executed one at a time
var loadingQueue = DelayedOpenQueue()

// expose private for plugins
root.private$ = private$

Expand Down Expand Up @@ -844,8 +849,6 @@ function make_seneca (initial_options) {
}
}

var loadingQueue = DelayedOpenQueue()

// useful when defining services!
// note: has EventEmitter.once semantics
// if using .on('ready',fn) it will be be called for each ready event
Expand Down

0 comments on commit 86ed42a

Please sign in to comment.