Creates a middleware factory that wraps function calls with a distributed
shared lock (reader-writer lock).
When the when setting is "READER" multiple callers can execute the
wrapped function concurrently. When "WRITER" the caller gets exclusive
access — no other reader or writer can hold the lock at the same time.
Creates a middleware factory that wraps function calls with a distributed shared lock (reader-writer lock).
When the
whensetting is"READER"multiple callers can execute the wrapped function concurrently. When"WRITER"the caller gets exclusive access — no other reader or writer can hold the lock at the same time.