修复了同步加载原生文件,程序卡死的问题。
This commit is contained in:
hevinci
2023-03-06 20:05:34 +08:00
parent b330d26b4f
commit ef5e1e65f9
7 changed files with 37 additions and 28 deletions
@@ -22,11 +22,6 @@ namespace YooAsset
private static readonly Dictionary<string, DownloaderBase> _downloaderDic = new Dictionary<string, DownloaderBase>();
private static readonly List<string> _removeList = new List<string>(100);
/// <summary>
/// 线程同步
/// </summary>
public static ThreadSyncContext SyncContext { set; get; }
/// <summary>
/// 自定义下载器的请求委托
/// </summary>
@@ -53,7 +48,6 @@ namespace YooAsset
/// </summary>
public static void Initialize()
{
SyncContext = new ThreadSyncContext();
}
/// <summary>
@@ -61,9 +55,6 @@ namespace YooAsset
/// </summary>
public static void Update()
{
if (SyncContext != null)
SyncContext.Update();
// 更新下载器
_removeList.Clear();
foreach (var valuePair in _downloaderDic)
@@ -94,7 +85,6 @@ namespace YooAsset
_downloaderDic.Clear();
_removeList.Clear();
SyncContext = null;
RequestDelegate = null;
CertificateHandlerInstance = null;
BreakpointResumeFileSize = int.MaxValue;