code: function(resourcesNo, debug){
  		resourcesNo = resourcesNo || 1;
  		/**
  		@memberof! qpp.SemaphoresHash#
  		@var {Array.<string,QPP.Semaphore>} semaphores - array hash of semaphores
  		*/
  		this.semaphores = {};
  		/**
  		@memberof! qpp.SemaphoresHash#
  		@private
  		@var {string} initialResources - initial (total) number of resources that SemaphoresHash has
  		*/
  		this.initialResources = resourcesNo;
  
  		/**
  		@memberof! qpp.SemaphoresHash#
  		@var {boolean} debug - defines if debugging messages should be shown during SemaphoresHash operations
  		*/
  		this.debug = typeof debug !== 'undefined' ? debug : false;
  	}
docs: Constructor function. Creates a new SemaphoresHash with optional and resources number
  
  @classdesc This is a class that provides promises enabled SemaphoresHashes.
  It is possible to create a SemaphoresHash with a name and speciffic number of resources that we can wait for to get available,
  and release them when we do not need them anymore
  
  @example
  Example of two consumers
  var QPP = require('./..');
  var s = new QPP.SemaphoresHash();
  s.create('test1');
  s.wait('test1');
  s.wait('test2'); // semaphore 'test2' is implictly created when we try to listen for it (no need for explicit create)
  s.signal('test2');
  s.signal('test1');
  
  For more examples, please check demo code and unit tests for @see qpp.SemaphoresHash
  
  @memberof qpp
  @alias qpp.SemaphoresHash
  @exports qpp.SemaphoresHash
  @class qpp.SemaphoresHash
  @param {string} [name="SemaphoresHash"] - The name of the created SemaphoresHash
  @param {number(integer)} [resourcesNo=1] - The total numer of resources available
  @param {boolean} [debug=false] - Defines if debugging messages should be shown during SemaphoresHash operations