/// <inheritdoc/> async ValueTask IAuditTrail <IRaftLogEntry> .AppendAsync <TEntryImpl>(ILogEntryProducer <TEntryImpl> entries, long startIndex, bool skipCommitted, CancellationToken token) { if (startIndex < 0L) { throw new ArgumentOutOfRangeException(nameof(startIndex)); } using (await syncRoot.AcquireWriteLockAsync(token).ConfigureAwait(false)) await AppendAsync(entries, startIndex, skipCommitted, token).ConfigureAwait(false); }
async ValueTask IAuditTrail <IRaftLogEntry> .AppendAsync <TEntry>(ILogEntryProducer <TEntry> entries, long startIndex, bool skipCommitted, CancellationToken token) { if (entries.RemainingCount == 0L) { return; } using (await syncRoot.AcquireWriteLockAsync(CancellationToken.None).ConfigureAwait(false)) await AppendAsync(entries, startIndex, skipCommitted, token); }