MCPcopy Create free account
hub / github.com/apache/cloudstack / completeOutstandingRequest

Function completeOutstandingRequest

tools/ngui/static/js/lib/angular.js:3039–3054  ·  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

3037 * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
3038 */
3039 function completeOutstandingRequest(fn) {
3040 try {
3041 fn.apply(null, sliceArgs(arguments, 1));
3042 } finally {
3043 outstandingRequestCount--;
3044 if (outstandingRequestCount === 0) {
3045 while(outstandingRequestCallbacks.length) {
3046 try {
3047 outstandingRequestCallbacks.pop()();
3048 } catch (e) {
3049 $log.error(e);
3050 }
3051 }
3052 }
3053 }
3054 }
3055
3056 /**
3057 * @private

Callers 1

BrowserFunction · 0.85

Calls 3

sliceArgsFunction · 0.85
applyMethod · 0.65
errorMethod · 0.45

Tested by

no test coverage detected