public void Run() { while (true) { Thread.Sleep(TimeSpan.FromSeconds(rand.Next(1, 5))); Console.WriteLine($"Reader {Id} wants to read."); db.AcquireReadLock(Id); Console.WriteLine($"Reader {Id} is reading ..."); Thread.Sleep(TimeSpan.FromSeconds(rand.Next(1, 5))); db.ReleaseReadLock(Id); } }