C# Class Agnos.Utils.ReentrantLock

A utility class that implements a reentrant lock (that may be locked multiple times by the same thread), as well as the IsHeldByCurrentThread() query
显示文件 Open project: tomerfiliba/agnos

Public Methods

Method Description
Acquire ( ) : void

acquires the lock. the lock must be released the same number of times it's been locked

IsHeldByCurrentThread ( ) : bool

tests whether the lock is held by the current (calling) thread

ReentrantLock ( ) : System
Release ( ) : void

releases the lock (must be called one for every Acquire())

Method Details

Acquire() public method

acquires the lock. the lock must be released the same number of times it's been locked
public Acquire ( ) : void
return void

IsHeldByCurrentThread() public method

tests whether the lock is held by the current (calling) thread
public IsHeldByCurrentThread ( ) : bool
return bool

ReentrantLock() public method

public ReentrantLock ( ) : System
return System

Release() public method

releases the lock (must be called one for every Acquire())
public Release ( ) : void
return void