Browse Source

Update PriorityQueue.js

Garrett Johnson 4 years ago
parent
commit
dbd518d14b
1 changed files with 1 additions and 8 deletions
  1. 1 8
      src/utilities/PriorityQueue.js

+ 1 - 8
src/utilities/PriorityQueue.js

@@ -1,10 +1,3 @@
-// Fires at the end of the frame and before the next one
-function enqueueMicrotask( callback ) {
-
-	Promise.resolve().then( callback );
-
-}
-
 class PriorityQueue {
 
 	constructor() {
@@ -121,7 +114,7 @@ class PriorityQueue {
 
 		if ( ! this.scheduled ) {
 
-			enqueueMicrotask( () => {
+			requestAnimationFrame( () => {
 
 				this.tryRunJobs();
 				this.scheduled = false;