Ejemplo n.º 1
0
 public static void testReentrantReader(ReadWriteLock readWriteLock)
 {
     for (int i = 0; i < 3; i++)
     {
         readWriteLock.ReadLock();
     }
     for (int i = 0; i < 3; i++)
     {
         readWriteLock.ReadUnlock();
     }
 }
Ejemplo n.º 2
0
 public static void testReader(ReadWriteLock readWriteLock)
 {
     readWriteLock.ReadLock();
     Thread.Sleep(300);
     readWriteLock.ReadUnlock();
 }