scripts
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
|
||||
namespace System.Threading
|
||||
{
|
||||
// Token: 0x02000613 RID: 1555
|
||||
internal class LockQueue
|
||||
{
|
||||
// Token: 0x060038D3 RID: 14547 RVA: 0x000C4378 File Offset: 0x000C2578
|
||||
public LockQueue(ReaderWriterLock rwlock)
|
||||
{
|
||||
this.rwlock = rwlock;
|
||||
}
|
||||
|
||||
// Token: 0x060038D4 RID: 14548 RVA: 0x000C4388 File Offset: 0x000C2588
|
||||
public bool Wait(int timeout)
|
||||
{
|
||||
bool flag = false;
|
||||
bool flag2;
|
||||
try
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
this.lockCount++;
|
||||
Monitor.Exit(this.rwlock);
|
||||
flag = true;
|
||||
flag2 = Monitor.Wait(this, timeout);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
Monitor.Enter(this.rwlock);
|
||||
this.lockCount--;
|
||||
}
|
||||
}
|
||||
return flag2;
|
||||
}
|
||||
|
||||
// Token: 0x17000B02 RID: 2818
|
||||
// (get) Token: 0x060038D5 RID: 14549 RVA: 0x000C4430 File Offset: 0x000C2630
|
||||
public bool IsEmpty
|
||||
{
|
||||
get
|
||||
{
|
||||
bool flag;
|
||||
lock (this)
|
||||
{
|
||||
flag = this.lockCount == 0;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060038D6 RID: 14550 RVA: 0x000C4480 File Offset: 0x000C2680
|
||||
public void Pulse()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
Monitor.Pulse(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060038D7 RID: 14551 RVA: 0x000C44C4 File Offset: 0x000C26C4
|
||||
public void PulseAll()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
Monitor.PulseAll(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040016EF RID: 5871
|
||||
private ReaderWriterLock rwlock;
|
||||
|
||||
// Token: 0x040016F0 RID: 5872
|
||||
private int lockCount;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user