Skip to content

Yield/Reacquire docs don't talk about task requirements #12013

@rainersigwald

Description

@rainersigwald

The docs for IBuildEngine3.Yield() and .Reacquire() describe how to call them and what happens but aren't very crisp on what burdens choosing to use them imposes on a task. We should extend them to describe:

  • After calling Yield(), global process state like environment variables and current working directory can change arbitrarily until Reacquire() returns.
  • As a result, if you are going to depend on any of that state, for instance by opening files by relative path rather than calling ITaskItem.GetMetadata("FullPath"), you must do so before calling Yield().
  • The common pattern is to figure out what all the long-running work is and start it before yielding.

Metadata

Metadata

Assignees

Labels

Area: DocumentationIssues about docs, including errors and areas we should extend (this repo and learn.microsoft.com)

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions