C# Class Distributed.Utility.Impl.ClrDistributedLock

基于Monitor的分布式锁。
Inheritance: IDistributedLock
Exibir arquivo Open project: RabbitTeam/Distributed

Public Methods

Method Description
Lock ( string token ) : void

锁定(超时时间为30秒)。

TryLock ( string token, System.TimeSpan timeout ) : void

尝试锁定。

UnLock ( string token ) : void

解锁。

Method Details

Lock() public method

锁定(超时时间为30秒)。
public Lock ( string token ) : void
token string 锁记号。
return void

TryLock() public method

尝试锁定。
public TryLock ( string token, System.TimeSpan timeout ) : void
token string 锁记号。
timeout System.TimeSpan 超时时间。
return void

UnLock() public method

解锁。
public UnLock ( string token ) : void
token string 锁记号。
return void