Skip to content

Commit 6087744

Browse files
committed
Adjusting some locking.
1 parent 6bb3c16 commit 6087744

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

xivModdingFramework/Models/FileTypes/Sklb.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace xivModdingFramework.Models.FileTypes
4949
/// </summary>
5050
public static class Sklb
5151
{
52-
private const string SkeletonsFolder = "Skeletons";
52+
public const string SkeletonsFolder = "Skeletons";
5353

5454
/// <summary>
5555
/// Retrieves the base racial or body skeleton for a given model file, parsing it from the base

xivModdingFramework/Mods/ModTransaction.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,13 @@ public async Task<IndexFile> GetIndexFile(XivDataFile dataFile)
386386
{
387387
while (_LoadingIndexFiles)
388388
{
389-
Thread.Sleep(1);
389+
await Task.Delay(10);
390390
}
391-
392-
if(!_IndexFiles.ContainsKey(dataFile))
391+
392+
_LoadingIndexFiles = true;
393+
try
393394
{
394-
_LoadingIndexFiles = true;
395-
try
395+
if (!_IndexFiles.ContainsKey(dataFile))
396396
{
397397
if (!_ReadOnly)
398398
{
@@ -421,12 +421,12 @@ public async Task<IndexFile> GetIndexFile(XivDataFile dataFile)
421421

422422
var idx = await Index.INTERNAL_GetIndexFile(dataFile, false, ReadOnly);
423423
_IndexFiles.Add(dataFile, idx);
424-
}
425-
finally
426-
{
427-
_LoadingIndexFiles = false;
428-
}
429424

425+
}
426+
}
427+
finally
428+
{
429+
_LoadingIndexFiles = false;
430430
}
431431
return _IndexFiles[dataFile];
432432
}

0 commit comments

Comments
 (0)