C# Class Catel.Threading.AsyncLock

Afficher le fichier Open project: Catel/Catel Class Usage Examples

Méthodes publiques

Méthode Description
AsyncLock ( ) : System

Creates a new async-compatible mutual exclusion lock.

AsyncLock ( IAsyncWaitQueue queue ) : System

Creates a new async-compatible mutual exclusion lock using the specified wait queue.

Lock ( ) : IDisposable

Synchronously acquires the lock. Returns a disposable that releases the lock when disposed. This method may block the calling thread.

Lock ( CancellationToken cancellationToken ) : IDisposable

Synchronously acquires the lock. Returns a disposable that releases the lock when disposed. This method may block the calling thread.

LockAsync ( ) : AwaitableDisposable

Asynchronously acquires the lock. Returns a disposable that releases the lock when disposed.

LockAsync ( CancellationToken cancellationToken ) : AwaitableDisposable

Asynchronously acquires the lock. Returns a disposable that releases the lock when disposed.

Private Methods

Méthode Description
ReleaseLock ( ) : void

Releases the lock.

Method Details

AsyncLock() public méthode

Creates a new async-compatible mutual exclusion lock.
public AsyncLock ( ) : System
Résultat System

AsyncLock() public méthode

Creates a new async-compatible mutual exclusion lock using the specified wait queue.
public AsyncLock ( IAsyncWaitQueue queue ) : System
queue IAsyncWaitQueue The wait queue used to manage waiters.
Résultat System

Lock() public méthode

Synchronously acquires the lock. Returns a disposable that releases the lock when disposed. This method may block the calling thread.
public Lock ( ) : IDisposable
Résultat IDisposable

Lock() public méthode

Synchronously acquires the lock. Returns a disposable that releases the lock when disposed. This method may block the calling thread.
public Lock ( CancellationToken cancellationToken ) : IDisposable
cancellationToken System.Threading.CancellationToken The cancellation token used to cancel the lock. If this is already set, then this method will attempt to take the lock immediately (succeeding if the lock is currently available).
Résultat IDisposable

LockAsync() public méthode

Asynchronously acquires the lock. Returns a disposable that releases the lock when disposed.
public LockAsync ( ) : AwaitableDisposable
Résultat AwaitableDisposable

LockAsync() public méthode

Asynchronously acquires the lock. Returns a disposable that releases the lock when disposed.
public LockAsync ( CancellationToken cancellationToken ) : AwaitableDisposable
cancellationToken System.Threading.CancellationToken The cancellation token used to cancel the lock. If this is already set, then this method will attempt to take the lock immediately (succeeding if the lock is currently available).
Résultat AwaitableDisposable