• Performance
  • API Documentation
  • Source Code
Show / Hide Table of Contents
  • InSync
    • AsyncSynchronized
    • AsyncSynchronized<T>
    • GuardedValue<T>
    • IAsyncSynchronized<T>
    • IBareAsyncLock
    • IBareAsyncLock<T>
    • IBareLock
    • IBareLock<T>
    • ISynchronized<T>
    • LockException
    • MultiSync
    • ReaderSynchronized<TRead>
    • ReaderWriterSynchronized<T>
    • ReaderWriterSynchronized<TWrite, TRead>
    • ReaderWriterSynchronizedFactory
    • Synchronized
    • Synchronized<T>
    • TimingMethod
    • UnlockException
    • UpgradeableReaderSynchronized<TRead>
    • ValueContainer<T>

Namespace InSync

Classes

AsyncSynchronized

Provides static methods for creating AsyncSynchronized<T> without explicitly specifying the type of the protected object.

AsyncSynchronized<T>

Uses to synchronize and only expose its protected object after a synchronization begins.

Various asynchronous operations are supported. Reentrant is not supported. The protected object is non-null.

GuardedValue<T>

Holds a value and cleans up when is called.

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 is used. Livelock may occur for a very short period under high contention. In such case, CPU power is wasted.

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 to synchronize and only expose its protected reader or writer after a respective read or write synchronization begins. All the methods implementing its interfaces refer to the writer part. The readers are accessible via Reader and UpgradeableReader.

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 to synchronize and only expose its protected object after a synchronization begins.

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.

Enums

TimingMethod

In This Article
Back to top Generated by DocFX