• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Web
      • FormattedImage
      • FormatUtilities
      • ImageCacheMetadata
      • ImageMetadata
    • SixLabors.ImageSharp.Web.Caching
      • CacheHash
      • ICacheHash
      • IImageCache
      • PhysicalFileSystemCache
      • PhysicalFileSystemCacheOptions
    • SixLabors.ImageSharp.Web.Commands
      • CommandParser
      • DictionaryExtensions
      • IRequestParser
      • PresetOnlyQueryCollectionRequestParser
      • PresetOnlyQueryCollectionRequestParserOptions
      • QueryCollectionRequestParser
    • SixLabors.ImageSharp.Web.Commands.Converters
      • ICommandConverter
      • ICommandConverter<T>
    • SixLabors.ImageSharp.Web.DependencyInjection
      • ApplicationBuilderExtensions
      • IImageSharpBuilder
      • ImageSharpBuilderExtensions
      • ImageSharpConfiguration
      • ServiceCollectionExtensions
    • SixLabors.ImageSharp.Web.Middleware
      • ConcurrentDictionaryExtensions
      • ImageCommandContext
      • ImageProcessingContext
      • ImageSharpMiddleware
      • ImageSharpMiddlewareOptions
    • SixLabors.ImageSharp.Web.Processors
      • BackgroundColorWebProcessor
      • FormatWebProcessor
      • IImageWebProcessor
      • JpegQualityWebProcessor
      • ResizeWebProcessor
    • SixLabors.ImageSharp.Web.Providers
      • IImageProvider
      • PhysicalFileSystemProvider
      • ProcessingBehavior
    • SixLabors.ImageSharp.Web.Resolvers
      • IImageCacheResolver
      • IImageResolver
      • PhysicalFileSystemCacheResolver
      • PhysicalFileSystemResolver
    • SixLabors.ImageSharp.Web.Synchronization
      • AsyncKeyLock<TKey>
      • AsyncKeyReaderWriterLock<TKey>
      • AsyncLock
      • AsyncReaderWriterLock
      • RefCountedConcurrentDictionary<TKey, TValue>

    Class AsyncReaderWriterLock

    An asynchronous locker that provides read and write locking policies.

    This is based on the following blog post: https://devblogs.microsoft.com/pfxteam/building-async-coordination-primitives-part-7-asyncreaderwriterlock/

    Inheritance
    Object
    AsyncReaderWriterLock
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: SixLabors.ImageSharp.Web.Synchronization
    Assembly: SixLabors.ImageSharp.Web.dll
    Syntax
    public class AsyncReaderWriterLock

    Constructors

    | Improve this Doc View Source

    AsyncReaderWriterLock()

    Initializes a new instance of the AsyncReaderWriterLock class.

    Declaration
    public AsyncReaderWriterLock()

    Properties

    | Improve this Doc View Source

    OnRelease

    Gets or sets the callback that should be invoked whenever this lock is released.

    Declaration
    public Action OnRelease { get; set; }
    Property Value
    Type Description
    Action

    Methods

    | Improve this Doc View Source

    ReaderLockAsync()

    Asynchronously obtains the lock in shared reader mode. Dispose the returned IDisposable to release the lock.

    Declaration
    public Task<IDisposable> ReaderLockAsync()
    Returns
    Type Description
    Task<IDisposable>

    The IDisposable that will release the lock.

    | Improve this Doc View Source

    WriterLockAsync()

    Asynchronously obtains the lock in exclusive writer mode. Dispose the returned IDisposable to release the lock.

    Declaration
    public Task<IDisposable> WriterLockAsync()
    Returns
    Type Description
    Task<IDisposable>

    The IDisposable that will release the lock.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX