Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces core APIs to enable thread-safe task execution in MSBuild's multithreaded execution model. The changes provide safe alternatives to global process state operations, allowing IMultithreadable tasks to run concurrently within a single MSBuild process.
Key changes:
- New
TaskEnvironmentclass providing thread-safe environment variable and path operations AbsolutePathstruct for safe path handlingIMultiThreadableTaskinterface for tasks that can execute in parallelMSBuildMultiThreadableTaskAttributefor marking existing tasks as thread-safe
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Framework/TaskEnvironment.cs | Core API providing thread-safe environment operations and path resolution |
| src/Framework/PathHelpers/AbsolutePath.cs | Immutable struct representing absolute file system paths |
| src/Framework/IMultiThreadableTask.cs | Interface for tasks capable of thread-safe execution |
| src/Framework/MSBuildMultiThreadableTaskAttribute.cs | Attribute for marking existing tasks as thread-safe |
| documentation/specs/multithreading/thread-safe-tasks.md | Updates to specification removing virtual modifiers |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
JanProvaznik
reviewed
Oct 9, 2025
Member
JanProvaznik
left a comment
There was a problem hiding this comment.
just venting some thoughts about doc comments, the shape of the code is good, approved, but needs another reviewer
Member
|
I added a bit of fit-and-finish to the existing API docs because I couldn't help myself. |
baronfel
approved these changes
Oct 13, 2025
This was referenced Oct 15, 2025
This was referenced Feb 23, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #11828
Changes:
This PR introduces the core APIs that enable thread-safe task execution in MSBuild's multithreaded execution model. These APIs provide safe alternatives to global process state operations, allowing
IMultithreadabletasks to run concurrently within a single MSBuild process.Node:
Adding multithreaded APIs in order to unblock #12617
Extracted APIs from #12608