Threading Threading
Threading Threading
DocFX + Singulink = ♥

Search Results for

    Enum AsyncReadWriteLockPreference

    Specifies who enters an AsyncReadWriteLock first when readers and writers both want it.

    Namespace: Singulink.Threading
    Assembly: Singulink.Threading.dll
    Syntax
    public enum AsyncReadWriteLockPreference
    Remarks

    Under every preference, writers enter in the order they arrived, and a caller that enters while nothing is held and nothing is waiting does not wait. The preferences differ in whether a reader that arrives while a writer is waiting enters ahead of it, and in who is next when the lock is released.

    Fields

    Name Description
    Fair

    Readers and writers enter in the order they arrived. This is the default.

    Readers

    Readers enter whenever the lock is not held in write mode, ahead of any writer that is waiting.

    Writers

    Writers enter ahead of any reader that is waiting, and readers that arrive while a writer is waiting wait behind it.

    © Singulink. All rights reserved.