src/utils/asyncobject.js
function AsyncObject() {
  assert(this instanceof AsyncObject);

  EventEmitter.call(this);

  this._asyncLock = new Lock();
  this._hooks = Object.create(null);

  this.loading = false;
  this.closing = false;
  this.loaded = false;
}
function AsyncObject() {
  assert(this instanceof AsyncObject);

  EventEmitter.call(this);

  this._asyncLock = new Lock();
  this._hooks = Object.create(null);

  this.loading = false;
  this.closing = false;
  this.loaded = false;
}
function AsyncObject ( ) { assert ( this instanceof AsyncObject ) ; EventEmitter . call ( this ) ; this . _asyncLock = new Lock ( ) ; this . _hooks = Object . create ( null ) ; this . loading = false ; this . closing = false ; this . loaded = false ; }
An abstract object that handles state and
provides recallable open and close methods.
@alias module:utils.AsyncObject
@constructor
@property {Boolean} loading
@property {Boolean} closing
@property {Boolean} loaded
An abstract object that handles state and provides recallable open and close methods .