Table of Contents

Class InMemoryLockProvider

Namespace
adas_core.Application.Services.Caching
Assembly
adas-core.Application.dll

Implementación local del sistema de locking por clave. Se basa en SemaphoreSlim y solo controla concurrencia DENTRO del proceso. Para CacheService (in-memory).

public class InMemoryLockProvider : ILockProvider
Inheritance
InMemoryLockProvider
Implements
Inherited Members
Extension Methods

Methods

AcquireAsync(string, TimeSpan)

Intenta adquirir el lock por clave.

public Task<bool> AcquireAsync(string key, TimeSpan timeout)

Parameters

key string
timeout TimeSpan

Returns

Task<bool>

ReleaseAsync(string)

Libera el lock (si existe y no está ya liberado).

public Task ReleaseAsync(string key)

Parameters

key string

Returns

Task