Skip to content

Commit 91ed664

Browse files
author
Oren (electricessence)
committed
Avoid pre-cancelling concurrent operations. Allow errors to bubble up.
1 parent 29eee92 commit 91ed664

File tree

5 files changed

+61
-65
lines changed

5 files changed

+61
-65
lines changed

Open.ChannelExtensions/Documentation.xml

Lines changed: 56 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Open.ChannelExtensions/Extensions.Pipe.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public static ChannelReader<TOut> PipeAsync<TIn, TOut>(this ChannelReader<TIn> s
101101
}, cancellationToken)
102102
.ContinueWith(
103103
t => writer.Complete(t.Exception),
104-
cancellationToken,
104+
CancellationToken.None,
105105
TaskContinuationOptions.ExecuteSynchronously,
106106
TaskScheduler.Current);
107107

Open.ChannelExtensions/Extensions.ReadConcurrently.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static Task<long> ReadAllConcurrentlyAsync<T>(this ChannelReader<T> reade
4242
.WhenAll(readers)
4343
.ContinueWith(
4444
t => t.Result.Sum(),
45-
cancellationToken,
45+
CancellationToken.None,
4646
TaskContinuationOptions.OnlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously,
4747
TaskScheduler.Current);
4848

Open.ChannelExtensions/Extensions.WriteConcurrently.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ public static Task<long> WriteAllConcurrentlyAsync<T>(this ChannelWriter<T> targ
5353

5454
return t;
5555
},
56-
cancellationToken,
56+
CancellationToken.None,
5757
TaskContinuationOptions.ExecuteSynchronously,
5858
TaskScheduler.Current)
5959
.Unwrap()
6060
.ContinueWith(
6161
t => t.Result.Sum(),
62-
cancellationToken,
62+
CancellationToken.None,
6363
TaskContinuationOptions.OnlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously,
6464
TaskScheduler.Current);
6565

Open.ChannelExtensions/Open.ChannelExtensions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<RepositoryType>git</RepositoryType>
1919
<PackageTags>channels dotnet threading tasks extensions</PackageTags>
2020
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
21-
<Version>3.2.2</Version>
21+
<Version>3.2.3</Version>
2222
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2323
<PackageReleaseNotes></PackageReleaseNotes>
2424
<RepositoryUrl>https://github.com/electricessence/Open.ChannelExtensions</RepositoryUrl>

0 commit comments

Comments
 (0)