mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Use default task scheduler.
This commit is contained in:
parent
0ec440c388
commit
9f7b95746d
12 changed files with 16 additions and 16 deletions
2
OtterGui
2
OtterGui
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1be9365d048bf1da3700e8cf1df9acbe42523f5c
|
Subproject commit 5a2e12a1acd6760a3a592447a92215135e79197c
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit c0c7eb0dedb32ea83b019626abba041e90a95319
|
Subproject commit c39f683d65d4541e9f97ed4ea1abcb10e8ca5690
|
||||||
|
|
@ -41,7 +41,7 @@ public partial class IndividualCollections
|
||||||
saver.ImmediateSave(parent);
|
saver.ImmediateSave(parent);
|
||||||
IsLoaded = true;
|
IsLoaded = true;
|
||||||
Loaded.Invoke();
|
Loaded.Invoke();
|
||||||
});
|
}, TaskScheduler.Default);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ public sealed class ModelManager(IFramework framework, ActiveCollections collect
|
||||||
{
|
{
|
||||||
return _tasks.TryRemove(a, out var unused);
|
return _tasks.TryRemove(a, out var unused);
|
||||||
}
|
}
|
||||||
}, CancellationToken.None);
|
}, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
|
||||||
return (t, token);
|
return (t, token);
|
||||||
}).Item1;
|
}).Item1;
|
||||||
}
|
}
|
||||||
|
|
@ -178,7 +178,7 @@ public sealed class ModelManager(IFramework framework, ActiveCollections collect
|
||||||
throw task.Exception;
|
throw task.Exception;
|
||||||
|
|
||||||
return process(action);
|
return process(action);
|
||||||
});
|
}, TaskScheduler.Default);
|
||||||
|
|
||||||
private class ExportToGltfAction(
|
private class ExportToGltfAction(
|
||||||
ModelManager manager,
|
ModelManager manager,
|
||||||
|
|
|
||||||
|
|
@ -46,12 +46,12 @@ public partial class TexToolsImporter : IDisposable
|
||||||
ExtractedMods = new List<(FileInfo, DirectoryInfo?, Exception?)>(count);
|
ExtractedMods = new List<(FileInfo, DirectoryInfo?, Exception?)>(count);
|
||||||
_token = _cancellation.Token;
|
_token = _cancellation.Token;
|
||||||
Task.Run(ImportFiles, _token)
|
Task.Run(ImportFiles, _token)
|
||||||
.ContinueWith(_ => CloseStreams())
|
.ContinueWith(_ => CloseStreams(), TaskScheduler.Default)
|
||||||
.ContinueWith(_ =>
|
.ContinueWith(_ =>
|
||||||
{
|
{
|
||||||
foreach (var (file, dir, error) in ExtractedMods)
|
foreach (var (file, dir, error) in ExtractedMods)
|
||||||
handler(file, dir, error);
|
handler(file, dir, error);
|
||||||
});
|
}, TaskScheduler.Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CloseStreams()
|
private void CloseStreams()
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public sealed class TextureManager : SingleTaskQueue, IDisposable
|
||||||
{
|
{
|
||||||
var token = new CancellationTokenSource();
|
var token = new CancellationTokenSource();
|
||||||
var task = Enqueue(a, token.Token);
|
var task = Enqueue(a, token.Token);
|
||||||
task.ContinueWith(_ => _tasks.TryRemove(a, out var unused), CancellationToken.None);
|
task.ContinueWith(_ => _tasks.TryRemove(a, out var unused), CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
|
||||||
return (task, token);
|
return (task, token);
|
||||||
}).Item1;
|
}).Item1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public class ModCacheManager : IDisposable
|
||||||
_communicator.ModPathChanged.Subscribe(OnModPathChange, ModPathChanged.Priority.ModCacheManager);
|
_communicator.ModPathChanged.Subscribe(OnModPathChange, ModPathChanged.Priority.ModCacheManager);
|
||||||
_communicator.ModDataChanged.Subscribe(OnModDataChange, ModDataChanged.Priority.ModCacheManager);
|
_communicator.ModDataChanged.Subscribe(OnModDataChange, ModDataChanged.Priority.ModCacheManager);
|
||||||
_communicator.ModDiscoveryFinished.Subscribe(OnModDiscoveryFinished, ModDiscoveryFinished.Priority.ModCacheManager);
|
_communicator.ModDiscoveryFinished.Subscribe(OnModDiscoveryFinished, ModDiscoveryFinished.Priority.ModCacheManager);
|
||||||
identifier.Awaiter.ContinueWith(_ => OnIdentifierCreation());
|
identifier.Awaiter.ContinueWith(_ => OnIdentifierCreation(), TaskScheduler.Default);
|
||||||
OnModDiscoveryFinished();
|
OnModDiscoveryFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ public abstract class AsyncServiceWrapper<T> : IDisposable
|
||||||
{
|
{
|
||||||
if (!_isDisposed)
|
if (!_isDisposed)
|
||||||
FinishedCreation?.Invoke();
|
FinishedCreation?.Invoke();
|
||||||
}, null);
|
}, TaskScheduler.Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ public partial class ModEditWindow
|
||||||
.ToList();
|
.ToList();
|
||||||
});
|
});
|
||||||
|
|
||||||
task.ContinueWith(t => { GamePaths = FinalizeIo(t); });
|
task.ContinueWith(t => { GamePaths = FinalizeIo(t); }, TaskScheduler.Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
private EstManipulation[] GetCurrentEstManipulations()
|
private EstManipulation[] GetCurrentEstManipulations()
|
||||||
|
|
@ -130,7 +130,7 @@ public partial class ModEditWindow
|
||||||
|
|
||||||
BeginIo();
|
BeginIo();
|
||||||
_edit._models.ExportToGltf(ExportConfig, Mdl, sklbPaths, ReadFile, outputPath)
|
_edit._models.ExportToGltf(ExportConfig, Mdl, sklbPaths, ReadFile, outputPath)
|
||||||
.ContinueWith(FinalizeIo);
|
.ContinueWith(FinalizeIo, TaskScheduler.Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Import a model from an interchange format. </summary>
|
/// <summary> Import a model from an interchange format. </summary>
|
||||||
|
|
@ -144,7 +144,7 @@ public partial class ModEditWindow
|
||||||
var mdlFile = FinalizeIo(task, result => result.Item1, result => result.Item2);
|
var mdlFile = FinalizeIo(task, result => result.Item1, result => result.Item2);
|
||||||
if (mdlFile != null)
|
if (mdlFile != null)
|
||||||
FinalizeImport(mdlFile);
|
FinalizeImport(mdlFile);
|
||||||
});
|
}, TaskScheduler.Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Finalise the import of a .mdl, applying any post-import transformations and state updates. </summary>
|
/// <summary> Finalise the import of a .mdl, applying any post-import transformations and state updates. </summary>
|
||||||
|
|
|
||||||
|
|
@ -255,7 +255,7 @@ public partial class ModEditWindow
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_framework.RunOnFrameworkThread(() => tex.Reload(_textures));
|
_framework.RunOnFrameworkThread(() => tex.Reload(_textures));
|
||||||
});
|
}, TaskScheduler.Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector2 GetChildWidth()
|
private Vector2 GetChildWidth()
|
||||||
|
|
|
||||||
|
|
@ -326,7 +326,7 @@ public partial class ModEditWindow : Window, IDisposable
|
||||||
else if (ImGuiUtil.DrawDisabledButton("Re-Duplicate and Normalize Mod", Vector2.Zero, tt, !_allowReduplicate && !modifier))
|
else if (ImGuiUtil.DrawDisabledButton("Re-Duplicate and Normalize Mod", Vector2.Zero, tt, !_allowReduplicate && !modifier))
|
||||||
{
|
{
|
||||||
_editor.ModNormalizer.Normalize(Mod!);
|
_editor.ModNormalizer.Normalize(Mod!);
|
||||||
_editor.ModNormalizer.Worker.ContinueWith(_ => _editor.LoadMod(Mod!, _editor.GroupIdx, _editor.OptionIdx));
|
_editor.ModNormalizer.Worker.ContinueWith(_ => _editor.LoadMod(Mod!, _editor.GroupIdx, _editor.OptionIdx), TaskScheduler.Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_editor.Duplicates.Worker.IsCompleted)
|
if (!_editor.Duplicates.Worker.IsCompleted)
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public class IndividualAssignmentUi : IDisposable
|
||||||
_actors = actors;
|
_actors = actors;
|
||||||
_collectionManager = collectionManager;
|
_collectionManager = collectionManager;
|
||||||
_communicator.CollectionChange.Subscribe(UpdateIdentifiers, CollectionChange.Priority.IndividualAssignmentUi);
|
_communicator.CollectionChange.Subscribe(UpdateIdentifiers, CollectionChange.Priority.IndividualAssignmentUi);
|
||||||
_actors.Awaiter.ContinueWith(_ => SetupCombos());
|
_actors.Awaiter.ContinueWith(_ => SetupCombos(), TaskScheduler.Default);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string PlayerTooltip { get; private set; } = NewPlayerTooltipEmpty;
|
public string PlayerTooltip { get; private set; } = NewPlayerTooltipEmpty;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue