Esempio n. 1
0
            private volatile bool _disposedValue = false;             // To detect redundant calls

            private void Dispose(bool disposing)
            {
                if (!_disposedValue)
                {
                    if (disposing)
                    {
                        try
                        {
                            AsyncMutex.ReleaseLock();
                        }
                        catch (Exception ex)
                        {
                            Logger.LogWarning(ex);
                        }
                    }

                    AsyncMutex = null;

                    _disposedValue = true;
                }
            }
Esempio n. 2
0
 /// <summary>
 /// Creates the key for a mutex.
 /// </summary>
 /// <param name="asyncMutex">The mutex to release. May not be <c>null</c>.</param>
 public Key(AsyncMutex asyncMutex)
 {
     AsyncMutex = asyncMutex;
 }