浏览代码

Update PriorityQueue.js

Garrett Johnson 4 年之前
父节点
当前提交
dbd518d14b
共有 1 个文件被更改,包括 1 次插入8 次删除
  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;