Skip to content

Async Test continuations now also run on the same thread when SIngleThreaded is used.#4883

Merged
stevenaw merged 2 commits into
mainfrom
AsyncSingleThread
Dec 12, 2024
Merged

Async Test continuations now also run on the same thread when SIngleThreaded is used.#4883
stevenaw merged 2 commits into
mainfrom
AsyncSingleThread

Conversation

@manfred-brands
Copy link
Copy Markdown
Member

Fixes #4110

If the TestContext.IsSingleThreaded is set using the [SingleThreaded] attribute and an Async operation is executed a SingleThreadedSynchronizationContext is created.

Copy link
Copy Markdown
Member

@stevenaw stevenaw left a comment

Choose a reason for hiding this comment

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

LGTM thanks @manfred-brands !
I'll request @jnm2 here for review too if they're available.

@stevenaw stevenaw requested a review from jnm2 November 11, 2024 21:30
@OsirisTerje
Copy link
Copy Markdown
Member

@manfred-brands @stevenaw Doesnt look like @jnm2 have time - so suggest we merge this "as is" . Lgtm.

Comment thread src/NUnitFramework/framework/Internal/AsyncToSyncAdapter.cs Outdated
Comment thread src/NUnitFramework/framework/Internal/AsyncToSyncAdapter.cs
@manfred-brands manfred-brands mentioned this pull request Nov 27, 2024
2 tasks
@manfred-brands
Copy link
Copy Markdown
Member Author

@OsirisTerje Are you ok for me to merge?

@stevenaw
Copy link
Copy Markdown
Member

I'm merging this as the changes have been approved and we've identified this as something we'd like for the next release.

@stevenaw stevenaw merged commit f46c6d8 into main Dec 12, 2024
@stevenaw stevenaw deleted the AsyncSingleThread branch December 12, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support running single-threaded async tests on Linux

4 participants