Explorar el Código

Update PriorityQueue.js

Garrett Johnson hace 4 años
padre
commit
dbd518d14b
Se han modificado 1 ficheros con 1 adiciones y 8 borrados
  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;