Skip to content

Commit 38485ce

Browse files
authored
Remove unused async callback system from library_browser.py (#13301)
This looks like it was only used by EMTERPRETIFY_ASYNC which was removed in #11020.
1 parent 1f4a748 commit 38485ce

File tree

1 file changed

+3
-30
lines changed

1 file changed

+3
-30
lines changed

src/library_browser.js

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -488,51 +488,24 @@ var LibraryBrowser = {
488488

489489
// abort and pause-aware versions TODO: build main loop on top of this?
490490

491-
allowAsyncCallbacks: true,
492-
queuedAsyncCallbacks: [],
493-
494-
pauseAsyncCallbacks: function() {
495-
Browser.allowAsyncCallbacks = false;
496-
},
497-
resumeAsyncCallbacks: function() { // marks future callbacks as ok to execute, and synchronously runs any remaining ones right now
498-
Browser.allowAsyncCallbacks = true;
499-
if (Browser.queuedAsyncCallbacks.length > 0) {
500-
var callbacks = Browser.queuedAsyncCallbacks;
501-
Browser.queuedAsyncCallbacks = [];
502-
callbacks.forEach(function(func) {
503-
func();
504-
});
505-
}
506-
},
507-
508491
safeRequestAnimationFrame: function(func) {
509492
return Browser.requestAnimationFrame(function() {
510493
if (ABORT) return;
511-
if (Browser.allowAsyncCallbacks) {
512-
func();
513-
} else {
514-
Browser.queuedAsyncCallbacks.push(func);
515-
}
494+
func();
516495
});
517496
},
518497
safeSetTimeout: function(func, timeout) {
519498
noExitRuntime = true;
520499
return setTimeout(function() {
521500
if (ABORT) return;
522-
if (Browser.allowAsyncCallbacks) {
523-
func();
524-
} else {
525-
Browser.queuedAsyncCallbacks.push(func);
526-
}
501+
func();
527502
}, timeout);
528503
},
529504
safeSetInterval: function(func, timeout) {
530505
noExitRuntime = true;
531506
return setInterval(function() {
532507
if (ABORT) return;
533-
if (Browser.allowAsyncCallbacks) {
534-
func();
535-
} // drop it on the floor otherwise, next interval will kick in
508+
func();
536509
}, timeout);
537510
},
538511

0 commit comments

Comments
 (0)