AyCode.Core/AyCode.Utils/Wrappers/README.md

481 B

Wrappers

Disposable wrappers enabling using pattern for synchronization primitives.

Key Files

  • ReleaseWrapperMutex.csIDisposable wrapper for Mutex. Calls ReleaseMutex() on dispose. Used via mutex.UseWaitOne().
  • ReleaseWrapperSemaphore.csIDisposable wrapper for SemaphoreSlim. Calls Release() on dispose. Used via semaphore.UseWait() / UseWaitAsync().

Both are idempotent (safe to dispose multiple times via _isDisposed flag).