Namespace InSync
Classes
AsyncSynchronized
Provides static methods for creating AsyncSynchronized<T> without explicitly specifying the type of the protected object.
AsyncSynchronized<T>
Uses
Various asynchronous operations are supported. Reentrant is not supported. The protected object is non-null.
GuardedValue<T>
Holds a value and cleans up when
LockException
The exception that is thrown when an exception is thrown when acquiring a lock.
MultiSync
Provides easy ways to acquire multiple locks without deadlocks. It does not require any setup nor lock organizations. Fairness is thread-based and provided by the OS because
It uses the smart and polite method described in https://howardhinnant.github.io/dining_philosophers.html#Polite. Basically, it tries to acquire the locks one by one. If an acquisition fails, it releases all acquired locks. Before a blocking retry of the last acquisition, it yields to let other threads to process first.
ReaderSynchronized<TRead>
Represents the reader part of ReaderWriterSynchronized<TWrite, TRead>.
ReaderWriterSynchronized<T>
Provides a simpler version of ReaderWriterSynchronized<TWrite, TRead> where the reader and writer are the same object.
ReaderWriterSynchronized<TWrite, TRead>
Uses
Asynchronous operations are not supported. The protected reader and writer are non-null.
ReaderWriterSynchronizedFactory
Provides static methods for creating ReaderWriterSynchronized<TWrite, TRead> without explicitly specifying the types of the protected reader and writer.
Synchronized
Provides static methods for creating Synchronized<T> without explicitly specifying the type of the protected object.
Synchronized<T>
Uses
Asynchronous operations are not supported. The protected object is non-null.
UnlockException
The exception that is thrown when an exception is thrown releasing some locks. There may be another exception thrown before releasing the locks. It is stored in
UpgradeableReaderSynchronized<TRead>
Represents the upgradeable reader part of ReaderWriterSynchronized<TWrite, TRead>.
ValueContainer<T>
Provides a way to change the protected value or protect a struct
in Synchronized and the variances.
Interfaces
IAsyncSynchronized<T>
Allows its protected object to be accessed only after a synchronization begins. Its methods automatically complete synchronizations or provide some means to do so. They properly handle exceptions thrown by starts of synchronization or users' operations.
Various asynchronous operations are supported. The protected object is non-null.
IBareAsyncLock
Provides abstraction of synchronization. It also allows its protected object to be accessed only after a synchronization begins.
Various asynchronous operations are supported. The protected object is non-null.
IBareAsyncLock<T>
This interface provides abstraction of synchronization. It also allows its protected object to be accessed only after a synchronization begins.
Various asynchronous operations are supported. The protected object is non-null.
IBareLock
Provides abstraction of synchronization. It also allows its protected object to be accessed only after a synchronization begins.
Asynchronous operations are not supported. The protected object is non-null.
IBareLock<T>
Provides abstraction of synchronization. It also allows its protected object to be accessed only after a synchronization begins.
Asynchronous operations are not supported. The protected object is non-null.
ISynchronized<T>
Allows its protected object to be accessed only after a synchronization begins. Its methods automatically complete synchronizations or provide some means to do so. They properly handle exceptions thrown by starts of synchronization or users' operations.
Asynchronous operations are not supported. The protected object is non-null.