Skip to content

perf: fix _parallelConstraints deferred initialisation - #4528

Merged
thomhurst merged 1 commit into
thomhurst:mainfrom
TimothyMakkison:par_constraint
Jan 25, 2026
Merged

thomhurst merged 1 commit into
thomhurst:mainfrom
TimothyMakkison:par_constraint

Conversation

@TimothyMakkison

@TimothyMakkison TimothyMakkison commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

[] will usually default to a List<T> when it is ambiguous, this ensures that an empty array is used when possible.

Before

image

After

image

Comment thread TUnit.Core/TestContext.Parallelization.cs
@thomhurst

Copy link
Copy Markdown
Owner

This feels like the compiler should have logic to use empty arrays in these scenarios! I was under the impression [] abstracted a lot of the stuff away and would choose the best type for you

@thomhurst
thomhurst merged commit 137b683 into thomhurst:main Jan 25, 2026
8 of 10 checks passed

This branch had an error being deployed

1 failed deployment
Pull Requests — 1feba7a4 Deployed Jan 25, 2026 by TimothyMakkison via modularpipeline (windows-latest) #14925
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.

2 participants