public void Update(TimeSpan elapsed) { while (this.QueuedTasks.Count > 0) { DBTask task = this.QueuedTasks.Dequeue(); if (DBSessions.Instance.Connection != null) { task.Execute(DBSessions.Instance.Connection); } else { Logging.LogManager.DefaultLogger.Error("could not execute db task because connection is null!"); } } }
public void ConcurrentExecuteTask(DBTask dbtask) { this.QueuedTasks.Enqueue(dbtask); }