您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
27 行
694 B
27 行
694 B
/*
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using Unity.UIWidgets.foundation;
|
|
using UnityEngine;
|
|
|
|
namespace Unity.UIWidgets.async {
|
|
public class MicrotaskQueue {
|
|
readonly Queue<Action> _queue = new Queue<Action>();
|
|
|
|
public void scheduleMicrotask(Action action) {
|
|
_queue.Enqueue(action);
|
|
}
|
|
|
|
public void flushMicrotasks() {
|
|
while (_queue.isNotEmpty()) {
|
|
var action = _queue.Dequeue();
|
|
try {
|
|
action();
|
|
}
|
|
catch (Exception ex) {
|
|
D.logError("Error to execute microtask: ", ex);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}*/
|