Add new analyzers.

This commit is contained in:
2024-11-10 04:17:05 +00:00
parent 89960e5ce8
commit 39e7654fdb
7 changed files with 160 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using RomRepoMgr.Database;
using RomRepoMgr.Database.Models;
@@ -418,12 +419,20 @@ public class Vfs : IDisposable
{
if(!_streamsCache.TryGetValue(handle, out Stream stream)) return -1;
lock(stream)
using var rwLock = new ReaderWriterLockSlim();
try
{
rwLock.EnterReadLock();
stream.Position = offset;
return stream.Read(buf, 0, buf.Length);
}
finally
{
rwLock.ExitReadLock();
}
}
internal bool Close(long handle)