C# Класс EpLibrary.cs.MutexEx

A class that handles the mutex functionality
Наследование: BaseLock, IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
Dispose ( ) : void
IsMutexAbandoned ( ) : bool

Returns the flag whether this mutex is abandoned or not.

Lock ( ) : bool

Locks the critical section

MutexEx ( MutexEx b ) : System

Default copy constructor

MutexEx ( String mutexName = null ) : System

Default constructor

MutexEx ( bool isInitialOwned, String mutexName = null ) : System

Default Constructor

TryLock ( ) : bool

Try to lock the critical section If other thread is already in the critical section, it just returns false and continue, otherwise obtain the ciritical section

TryLockFor ( int dwMilliSecond ) : bool

Try to lock the critical section for given time

Unlock ( ) : void

Leave the critical section

Защищенные методы

Метод Описание
Dispose ( bool isDisposing ) : void

Описание методов

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool isDisposing ) : void
isDisposing bool
Результат void

IsMutexAbandoned() публичный Метод

Returns the flag whether this mutex is abandoned or not.
public IsMutexAbandoned ( ) : bool
Результат bool

Lock() публичный Метод

Locks the critical section
public Lock ( ) : bool
Результат bool

MutexEx() публичный Метод

Default copy constructor
public MutexEx ( MutexEx b ) : System
b MutexEx the object to copy from
Результат System

MutexEx() публичный Метод

Default constructor
public MutexEx ( String mutexName = null ) : System
mutexName String name of the mutex
Результат System

MutexEx() публичный Метод

Default Constructor
public MutexEx ( bool isInitialOwned, String mutexName = null ) : System
isInitialOwned bool flag to own the mutex on creation
mutexName String name of the mutex
Результат System

TryLock() публичный Метод

Try to lock the critical section If other thread is already in the critical section, it just returns false and continue, otherwise obtain the ciritical section
public TryLock ( ) : bool
Результат bool

TryLockFor() публичный Метод

Try to lock the critical section for given time
public TryLockFor ( int dwMilliSecond ) : bool
dwMilliSecond int the wait time
Результат bool

Unlock() публичный Метод

Leave the critical section
public Unlock ( ) : void
Результат void