MCPcopy Create free account
hub / github.com/JacksonTian/fks / completeOutstandingRequest

Function completeOutstandingRequest

fks_chart/bower_components/angular/angular.js:4409–4424  ·  view source on GitHub ↗

* Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks` * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.

(fn)

Source from the content-addressed store, hash-verified

4407 * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
4408 */
4409 function completeOutstandingRequest(fn) {
4410 try {
4411 fn.apply(null, sliceArgs(arguments, 1));
4412 } finally {
4413 outstandingRequestCount--;
4414 if (outstandingRequestCount === 0) {
4415 while(outstandingRequestCallbacks.length) {
4416 try {
4417 outstandingRequestCallbacks.pop()();
4418 } catch (e) {
4419 $log.error(e);
4420 }
4421 }
4422 }
4423 }
4424 }
4425
4426 /**
4427 * @private

Callers 1

BrowserFunction · 0.85

Calls 1

sliceArgsFunction · 0.85

Tested by

no test coverage detected