protected void Execute() { int count = QueuedCommands.Count; for (int i = 0; i < count; ++i) { var op = QueuedCommands[0]; QueuedCommands.RemoveAt(0); op.Execute(RedisClient); QueuedCommands.Add(op); } }
protected async ValueTask ExecuteAsync() { int count = QueuedCommands.Count; for (int i = 0; i < count; ++i) { var op = QueuedCommands[0]; QueuedCommands.RemoveAt(0); await op.ExecuteAsync(RedisClient).ConfigureAwait(false); QueuedCommands.Add(op); } }