bower_components/qunit/qunit/qunit.js
function internalStop(test) {
  	test.semaphore += 1;
  	config.blocking = true;

  	// Set a recovery timeout, if so configured.
  	if (defined.setTimeout) {
  		var timeoutDuration = void 0;

  		if (typeof test.timeout === "number") {
  			timeoutDuration = test.timeout;
  		} else if (typeof config.testTimeout === "number") {
  			timeoutDuration = config.testTimeout;
  		}

  		if (typeof timeoutDuration === "number" && timeoutDuration > 0) {
  			clearTimeout(config.timeout);
  			config.timeout = setTimeout(function () {
  				pushFailure("Test took longer than " + timeoutDuration + "ms; test timed out.", sourceFromStacktrace(2));
  				internalRecover(test);
  			}, timeoutDuration);
  		}
  	}

  	var released = false;
  	return function resume() {
  		if (released) {
  			return;
  		}

  		released = true;
  		test.semaphore -= 1;
  		internalStart(test);
  	};
  }
function internalStop(test) {
  	test.semaphore += 1;
  	config.blocking = true;

  	// Set a recovery timeout, if so configured.
  	if (defined.setTimeout) {
  		var timeoutDuration = void 0;

  		if (typeof test.timeout === "number") {
  			timeoutDuration = test.timeout;
  		} else if (typeof config.testTimeout === "number") {
  			timeoutDuration = config.testTimeout;
  		}

  		if (typeof timeoutDuration === "number" && timeoutDuration > 0) {
  			clearTimeout(config.timeout);
  			config.timeout = setTimeout(function () {
  				pushFailure("Test took longer than " + timeoutDuration + "ms; test timed out.", sourceFromStacktrace(2));
  				internalRecover(test);
  			}, timeoutDuration);
  		}
  	}

  	var released = false;
  	return function resume() {
  		if (released) {
  			return;
  		}

  		released = true;
  		test.semaphore -= 1;
  		internalStart(test);
  	};
  }
function internalStop ( test ) { test . semaphore += 1 ; config . blocking = true ; // Set a recovery timeout, if so configured. if ( defined . setTimeout ) { var timeoutDuration = void 0 ; if ( typeof test . timeout === "number" ) { timeoutDuration = test . timeout ; } else if ( typeof config . testTimeout === "number" ) { timeoutDuration = config . testTimeout ; } if ( typeof timeoutDuration === "number" && timeoutDuration > 0 ) { clearTimeout ( config . timeout ) ; config . timeout = setTimeout ( function ( ) { pushFailure ( "Test took longer than " + timeoutDuration + "ms; test timed out." , sourceFromStacktrace ( 2 ) ) ; internalRecover ( test ) ; } , timeoutDuration ) ; } } var released = false ; return function resume ( ) { if ( released ) { return ; } released = true ; test . semaphore -= 1 ; internalStart ( test ) ; } ; }
Put a hold on processing and return a function that will release it.
Put a hold on processing and return a function that will release it .