mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 20:54:16 +01:00
fix: ITextureProvider thread-safety
This commit is contained in:
parent
2bdc4445d4
commit
b96ef30c20
1 changed files with 5 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
@ -485,17 +485,17 @@ internal class TextureManager : IDisposable, IServiceType, ITextureSubstitutionP
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<ITextureProvider>]
|
[ResolveVia<ITextureProvider>]
|
||||||
#pragma warning restore SA1015
|
#pragma warning restore SA1015
|
||||||
internal class TextureManagerPluginScoped : ITextureProvider, IServiceType, IDisposable
|
internal class TextureProviderPluginScoped : ITextureProvider, IServiceType, IDisposable
|
||||||
{
|
{
|
||||||
private readonly TextureManager textureManager;
|
private readonly TextureManager textureManager;
|
||||||
|
|
||||||
private readonly List<TextureManagerTextureWrap> trackedTextures = new();
|
private readonly ConcurrentBag<TextureManagerTextureWrap> trackedTextures = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="TextureManagerPluginScoped"/> class.
|
/// Initializes a new instance of the <see cref="TextureProviderPluginScoped"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="textureManager">TextureManager instance.</param>
|
/// <param name="textureManager">TextureManager instance.</param>
|
||||||
public TextureManagerPluginScoped(TextureManager textureManager)
|
public TextureProviderPluginScoped(TextureManager textureManager)
|
||||||
{
|
{
|
||||||
this.textureManager = textureManager;
|
this.textureManager = textureManager;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue