New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WithCancellation for async enumerables #21939

Merged
merged 1 commit into from Jan 11, 2019

Conversation

Projects
None yet
3 participants
@stephentoub
Copy link
Member

stephentoub commented Jan 10, 2019

Contributes to dotnet/corefx#33909
cc: @jcouv, @kouvel, @tarekgh

Relates to async-streams umbrella: dotnet/roslyn#24037

{
/// <summary>Provides an awaitable async enumerable that enables cancelable iteration and configured awaits.</summary>
[StructLayout(LayoutKind.Auto)]
public readonly struct ConfiguredCancelableAsyncEnumerable<T>

This comment has been minimized.

@jcouv

jcouv Jan 10, 2019

Member

ConfiguredCancelableAsyncEnumerable [](start = 27, length = 35)

nit: I'm unsure which spelling is more common (cancellable vs. cancelable). I would have gone with two L's.

Apparently, US is one L, and UK is two L's ;-)
https://www.collinsdictionary.com/dictionary/english/cancellable

But I'd still lean towards two L's, to match CancellationToken

This comment has been minimized.

@tarekgh

tarekgh Jan 10, 2019

Member

We have it one L in other places like TaskCanceledException, Task.IsCanceled, Task.FromCanceled, TaskCompletionSource.SetCanceled..etc.

Although we are not consistent in the spelling as CancellationToken uses 2 L's but it looks the majority of the usage is using 1 L.

This comment has been minimized.

@stephentoub

stephentoub Jan 10, 2019

Member

Right, we have some inconsistency from early usage of "cancel" in .NET Framework 3.x and earlier. As of .NET Framework 4, we settled on cancel, canceled, canceling, canceler, cancelable, etc., all with one L, and then cancellation with two Ls.

@jcouv

jcouv approved these changes Jan 10, 2019

Copy link
Member

jcouv left a comment

LGTM
The spelling question probably doesn't matter much as most people will not see this type. They will see WithCancellation and CancellationToken.
I don't know how testing works. I assume you'll have some coverage in another PR/repo?

@tarekgh

This comment has been minimized.

Copy link
Member

tarekgh commented Jan 10, 2019

I don't know how testing works. I assume you'll have some coverage in another PR/repo?

@jcouv you already included in the test changes PR dotnet/corefx#34528

@stephentoub

This comment has been minimized.

Copy link
Member

stephentoub commented Jan 10, 2019

@dotnet-bot test Ubuntu arm Cross Checked Innerloop Build and Test please

@stephentoub stephentoub merged commit b46881a into dotnet:master Jan 11, 2019

30 checks passed

CentOS7.1 x64 Checked Innerloop Build and Test Build finished.
Details
CentOS7.1 x64 Debug Innerloop Build Build finished.
Details
Linux-musl x64 Debug Build Build finished.
Details
OSX10.12 x64 Checked Innerloop Build and Test Build finished.
Details
Tizen armel Cross Checked Innerloop Build and Test Build finished.
Details
Ubuntu arm Cross Checked Innerloop Build and Test Build finished.
Details
Ubuntu arm Cross Checked crossgen_comparison Build and Test Build finished.
Details
Ubuntu arm Cross Checked no_tiered_compilation_innerloop Build and Test Build finished.
Details
Ubuntu arm Cross Release crossgen_comparison Build and Test Build finished.
Details
Ubuntu x64 Checked CoreFX Tests Build finished.
Details
Ubuntu x64 Checked Innerloop Build and Test Build finished.
Details
Ubuntu x64 Checked Innerloop Build and Test (Jit - TieredCompilation=0) Build finished.
Details
Ubuntu x64 Formatting Build finished.
Details
Ubuntu16.04 arm64 Cross Checked Innerloop Build and Test Build finished.
Details
Ubuntu16.04 arm64 Cross Checked no_tiered_compilation_innerloop Build and Test Build finished.
Details
Windows_NT arm Cross Debug Innerloop Build Build finished.
Details
Windows_NT arm64 Cross Debug Innerloop Build Build finished.
Details
Windows_NT x64 Checked CoreFX Tests Build finished.
Details
Windows_NT x64 Checked Innerloop Build and Test Build finished.
Details
Windows_NT x64 Checked Innerloop Build and Test (Jit - TieredCompilation=0) Build finished.
Details
Windows_NT x64 Formatting Build finished.
Details
Windows_NT x64 Release CoreFX Tests Build finished.
Details
Windows_NT x64 full_opt ryujit CoreCLR Perf Tests Correctness Build finished.
Details
Windows_NT x64 min_opt ryujit CoreCLR Perf Tests Correctness Build finished.
Details
Windows_NT x86 Checked Innerloop Build and Test Build finished.
Details
Windows_NT x86 Checked Innerloop Build and Test (Jit - TieredCompilation=0) Build finished.
Details
Windows_NT x86 Release Innerloop Build and Test Build finished.
Details
Windows_NT x86 full_opt ryujit CoreCLR Perf Tests Correctness Build finished.
Details
Windows_NT x86 min_opt ryujit CoreCLR Perf Tests Correctness Build finished.
Details
license/cla All CLA requirements met.
Details

Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corefx that referenced this pull request Jan 11, 2019

Add WithCancellation for async enumerables (dotnet/coreclr#21939)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>

Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/mono that referenced this pull request Jan 11, 2019

Add WithCancellation for async enumerables (dotnet/coreclr#21939)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>

Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corert that referenced this pull request Jan 11, 2019

Add WithCancellation for async enumerables (dotnet/coreclr#21939)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>

MichalStrehovsky added a commit to dotnet/corert that referenced this pull request Jan 11, 2019

Add WithCancellation for async enumerables (dotnet/coreclr#21939)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>

marek-safar added a commit to mono/mono that referenced this pull request Jan 11, 2019

Add WithCancellation for async enumerables (dotnet/coreclr#21939)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>

stephentoub added a commit to dotnet/corefx that referenced this pull request Jan 11, 2019

Add WithCancellation for async enumerables (dotnet/coreclr#21939)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment