Skip to content

Commit

Permalink
Expose processes leveraged by BuildManager (#11146)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanKrivanek authored Jan 3, 2025
1 parent 96450a9 commit c03b15e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Build/BackEnd/BuildManager/BuildManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,15 @@ void Callback(object? state)
ThreadPoolExtensions.QueueThreadPoolWorkItemWithCulture(Callback, parentThreadCulture, parentThreadUICulture);
}

/// <summary>
/// Point in time snapshot of all worker processes leveraged by this BuildManager.
/// This is meant to be used by VS. External users should not this is only best-effort, point-in-time functionality
/// without guarantee of 100% correctness and safety.
/// </summary>
/// <returns>Enumeration of <see cref="Process"/> objects that were valid during the time of call to this function.</returns>
public IEnumerable<Process> GetWorkerProcesses()
=> (_nodeManager?.GetProcesses() ?? []).Concat(_taskHostNodeManager?.GetProcesses() ?? []);

/// <summary>
/// Clears out all of the cached information.
/// </summary>
Expand Down

0 comments on commit c03b15e

Please sign in to comment.