Skip to content

Commit 81555d7

Browse files
Eliminated public API warning.
1 parent 7937e46 commit 81555d7

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Open.ChannelExtensions/Extensions.WriteConcurrently.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@ public static Task<long> WriteAllConcurrentlyAsync<T>(
141141
IEnumerable<Task<T>> source,
142142
bool complete = false,
143143
CancellationToken cancellationToken = default)
144-
=> WriteAllConcurrentlyAsync(target, maxConcurrency, source.WrapValueTask(), complete, cancellationToken);
144+
=> WriteAllConcurrentlyAsync(
145+
target,
146+
maxConcurrency,
147+
(source ?? throw new ArgumentNullException(nameof(source))).WrapValueTask(),
148+
complete,
149+
cancellationToken);
145150

146151
/// <summary>
147152
/// Asynchronously executes all entries and writes their results to the channel.
@@ -160,5 +165,9 @@ public static Task<long> WriteAllConcurrentlyAsync<T>(
160165
IEnumerable<Func<T>> source,
161166
bool complete = false,
162167
CancellationToken cancellationToken = default)
163-
=> WriteAllConcurrentlyAsync(target, maxConcurrency, source.WrapValueTask(), complete, cancellationToken);
168+
=> WriteAllConcurrentlyAsync(
169+
target,
170+
maxConcurrency,
171+
(source ?? throw new ArgumentNullException(nameof(source))).WrapValueTask(),
172+
complete, cancellationToken);
164173
}

0 commit comments

Comments
 (0)