Interface IAppMutexService
Build-in distributed mutex.
public interface IAppMutexService
Methods
LockAsync(string, GlowAppScope)
Acquires ownership of the mutex specified.
ValueTask<IAppMutexService.IAppMutexHandler> LockAsync(string mutexName, GlowAppScope scope = GlowAppScope.Service)
Parameters
mutexName
stringThe mutex name
scope
GlowAppScopeThe scope of the mutex.
- QuantumSpace scope means the mutex is shared with other services in the same QuantumSpace.
- Service scope means this mutex is only visible to other instances of the same service.
Returns
LockAsync(string, CancellationToken, GlowAppScope)
Acquires ownership of the mutex specified.
ValueTask<IAppMutexService.IAppMutexHandler> LockAsync(string mutexName, CancellationToken cancellationToken, GlowAppScope scope = GlowAppScope.Service)
Parameters
mutexName
stringThe mutex name
cancellationToken
CancellationTokenRequest mutex lock cancellation
scope
GlowAppScopeThe scope of the mutex.
- QuantumSpace scope means the mutex is shared with other services in the same QuantumSpace.
- Service scope means this mutex is only visible to other instances of the same service.