Skip to content

Use Interlocked.Increment for thread-safe test counters#1

Merged
jonathanpeppers merged 1 commit intomainfrom
update-from-template
Apr 2, 2026
Merged

Use Interlocked.Increment for thread-safe test counters#1
jonathanpeppers merged 1 commit intomainfrom
update-from-template

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Owner

With [assembly: Parallelize(Scope = ExecutionScope.MethodLevel)], ConsumeAsync may be called concurrently from multiple threads. Passed++/Failed++/Skipped++ are not atomic and can lose increments.

Synced from the dotnet/android template in dotnet/android#10862.

With [assembly: Parallelize(Scope = ExecutionScope.MethodLevel)],
ConsumeAsync may be called concurrently from multiple threads.
Passed++/Failed++/Skipped++ are not atomic and can lose increments.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers jonathanpeppers merged commit ab28a29 into main Apr 2, 2026
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.

1 participant