private void Worker() { while (this._running || this._queue.Count > 0) { Oxide.Core.SQLite.Libraries.SQLite.SQLiteQuery sQLiteQuery = null; lock (this._syncroot) { if (this._queue.Count <= 0) { foreach (Connection _runningConnection in this._runningConnections) { if (_runningConnection == null || _runningConnection.get_ConnectionPersistent()) { continue; } this.CloseDb(_runningConnection); } this._runningConnections.Clear(); } else { sQLiteQuery = this._queue.Dequeue(); } } if (sQLiteQuery == null) { if (!this._running) { continue; } this._workevent.WaitOne(); } else { sQLiteQuery.Handle(); if (sQLiteQuery.Connection == null) { continue; } this._runningConnections.Add(sQLiteQuery.Connection); } } }