Пример #1
0
        /// <inheritdoc />
        public override void Dispose()
        {
            try
            {
                using (new AutoLocker(_disposalLock))
                {
                    if (_disposed)
                    {
                        return;
                    }

                    _disposed = true;
                }

                _processWatcherThread?.Join();
                _processWatcherThread = null;

                AttemptGracefulShutdown();
                EndServerProcess();
                base.Dispose();
                _autoDeleter?.Dispose();
                _autoDeleter = null;
            }
            catch (Exception ex)
            {
                Log($"Unable to kill MySql instance {_serverProcess?.Id}: {ex.Message}");
            }
        }
Пример #2
0
 /// <inheritdoc />
 public override void Dispose()
 {
     try
     {
         AttemptGracefulShutdown();
         EndServerProcess();
         base.Dispose();
         _autoDeleter?.Dispose();
         _autoDeleter = null;
     }
     catch (Exception ex)
     {
         Log($"Unable to kill MySql instance {_serverProcess?.Id}: {ex.Message}");
     }
 }