mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
chore: lock plugin lists when applying profile want state
This commit is contained in:
parent
10276a651d
commit
3d47e05ab0
2 changed files with 5 additions and 3 deletions
|
|
@ -162,7 +162,7 @@ internal partial class PluginManager : IDisposable, IServiceType
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a list of all available plugins.
|
/// Gets a copy of the list of all available plugins.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEnumerable<RemotePluginManifest> AvailablePlugins
|
public IEnumerable<RemotePluginManifest> AvailablePlugins
|
||||||
{
|
{
|
||||||
|
|
@ -176,7 +176,7 @@ internal partial class PluginManager : IDisposable, IServiceType
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a list of all plugins with an available update.
|
/// Gets a copy of the list of all plugins with an available update.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEnumerable<AvailablePluginUpdate> UpdatablePlugins
|
public IEnumerable<AvailablePluginUpdate> UpdatablePlugins
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,9 @@ internal class ProfileManager : IServiceType
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ApplyAllWantStates()
|
public void ApplyAllWantStates()
|
||||||
{
|
{
|
||||||
|
var pm = Service<PluginManager>.Get();
|
||||||
|
using var pmLock = pm.LockPluginLists();
|
||||||
|
|
||||||
this.isBusy = true;
|
this.isBusy = true;
|
||||||
Log.Information("Getting want states...");
|
Log.Information("Getting want states...");
|
||||||
|
|
||||||
|
|
@ -185,7 +188,6 @@ internal class ProfileManager : IServiceType
|
||||||
|
|
||||||
Log.Information("Applying want states...");
|
Log.Information("Applying want states...");
|
||||||
|
|
||||||
var pm = Service<PluginManager>.Get();
|
|
||||||
var tasks = new List<Task>();
|
var tasks = new List<Task>();
|
||||||
|
|
||||||
foreach (var installedPlugin in pm.InstalledPlugins)
|
foreach (var installedPlugin in pm.InstalledPlugins)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue