Skip to content

feat: Remove TaskCompletionSource cancellation workaround for net6.0 onwards#77

Merged
HofmeisterAn merged 3 commits intotestcontainers:mainfrom
campersau:removecancellationworkaround
Mar 2, 2026
Merged

feat: Remove TaskCompletionSource cancellation workaround for net6.0 onwards#77
HofmeisterAn merged 3 commits intotestcontainers:mainfrom
campersau:removecancellationworkaround

Conversation

@campersau
Copy link

This removes the cancellation workaround added in dotnet#487
In .NET there is now a SerializeToStreamAsync method which receives the cancellationToken.
For netstandard the cancellationToken for the request is passed to SerializeToStreamAsync manually.
Also remove one CancellationTokenSource and use CancelAfter instead.

It gets more difficult to test on netstandard...

Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again.

@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Mar 2, 2026
@HofmeisterAn HofmeisterAn changed the title Remove TaskCompletionSource cancellation workaround feat: Remove TaskCompletionSource cancellation workaround for net6.0 onwards Mar 2, 2026
@HofmeisterAn HofmeisterAn merged commit 05d11c7 into testcontainers:main Mar 2, 2026
15 checks passed
@campersau campersau deleted the removecancellationworkaround branch March 2, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants