msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

[Bug]: Question: Are cores from `IBuildEngine9.RequestCores` expected to be released between batched task invocations?

Open radical opened this issue 1 year ago • 3 comments

Issue Description

EmitBundleBase task in dotnet/runtime uses IBuildEngine9.RequestCores, and depends on these being released when the task's Execute is done. But if the task is batched, then for any subsequent invocations the task gets blocked on RequestCores. If I use ReleaseCores before returning from Execute, then it works fine.

Is this the expected behavior?

Steps to Reproduce

Question about the expected behavior

Expected Behavior

resource cores get released automatically at the end of a task

Actual Behavior

resource cores are not released between batched task runs.

Analysis

No response

Versions & Configurations

No response

radical avatar Nov 29 '23 20:11 radical

Your task should release cores, but also yes, each batch should release any unreleased cores from that task invocation.

rainersigwald avatar Nov 29 '23 21:11 rainersigwald

Your task should release cores, but also yes, each batch should release any unreleased cores from that task invocation.

Ok, so release as soon as that parallel work is done 👍

radical avatar Nov 29 '23 21:11 radical

We are considering changes so it will release cores after each Execute.

rokonec avatar Jan 11 '24 23:01 rokonec