MCPcopy Index your code
hub / github.com/microsoft/SandDance / poll1

Function poll1

docs/app/js/sanddance-app.js:65490–65498  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65488 var counter = 0;
65489 this._pollingPromise = new Promise(function(resolve, reject) {
65490 var poll1 = function poll() {
65491 if (_this2.isResultAvailable()) {
65492 resolve(_this2.getResult());
65493 _this2._pollingPromise = null;
65494 } else if ((counter++) > limit) {
65495 reject("Timed out");
65496 _this2._pollingPromise = null;
65497 } else requestAnimationFrame(poll);
65498 };
65499 requestAnimationFrame(poll1);
65500 });
65501 return this._pollingPromise;

Callers

nothing calls this directly

Calls 3

rejectFunction · 0.85
resolveFunction · 0.70
requestAnimationFrameFunction · 0.70

Tested by

no test coverage detected