var AppWorkerInfo = function(appSpec, listenPort, logFilePath, exitPromise) {
  this.appSpec = appSpec;
  this.listenPort = listenPort;
  this.logFilePath = logFilePath;
  this.exitPromise = exitPromise;
};
module.exports = AppWorkerInfo;

(function() {

}).call(AppWorkerInfo.prototype);
var events = require('events');
var util = require('util');

var AppWorkerInfo = function(appSpec, listenPort, logFilePath, exitPromise) {
  events.EventEmitter.call(this);
  this.appSpec = appSpec;
  this.listenPort = listenPort;
  this.logFilePath = logFilePath;
  this.exitPromise = exitPromise;

  this.$refCount = 0;
};
module.exports = AppWorkerInfo;

util.inherits(AppWorkerInfo, events.EventEmitter);

(function() {

  /**
   * Increment reference count.
   *
   * Call when a client is using this worker. This prevents the worker from
   * being reaped. Call release() when the client is done using the worker.
   */
  this.acquire = function() {
    this.$refCount++;
    this.emit('acquire', this.$refCount);
  };

  /**
   * Decrement reference count.
   *
   * Call when a client is done using this worker. This allows the worker to
   * potentially be reaped if the refcount is zero.
   */
  this.release = function() {
    this.$refCount--;
    this.emit('release', this.$refCount);
  };

}).call(AppWorkerInfo.prototype);
Add acquire/release to worker info
Add acquire/release to worker info
