Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Mirror changes from dotnet/coreclr#4329

Merged
jkotas merged 1 commit into
masterfrom
mirror-merge-9270149
Aug 16, 2017
Merged

Mirror changes from dotnet/coreclr#4329
jkotas merged 1 commit into
masterfrom
mirror-merge-9270149

Conversation

@dotnet-bot
Copy link
Copy Markdown
Collaborator

This PR contains mirrored changes from dotnet/coreclr

Please REBASE this PR when merging

Remove overhead from AsyncValueTaskMethodBuilder.Create

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
@jkotas jkotas merged commit fc27595 into master Aug 16, 2017
@stephentoub stephentoub deleted the mirror-merge-9270149 branch August 16, 2017 15:39
@stephentoub
Copy link
Copy Markdown
Member

@jkotas, I just noticed that corert's AsyncTaskMethodBuilder<TResult>.Create is different from coreclr's. The one in coreclr just returns default(AsyncTaskMethodBuilder<TResult>), but the one in corert does additional work if the debugger is attached:

public static AsyncTaskMethodBuilder<TResult> Create()
{
AsyncTaskMethodBuilder<TResult> atmb = new AsyncTaskMethodBuilder<TResult>();
// On ProjectN we will eagerly initalize the task and it's Id if the debugger is attached
atmb.m_task = (Task<TResult>)atmb.GetTaskIfDebuggingEnabled();
if (atmb.m_task != null)
{
int i = atmb.m_task.Id;
}
return atmb;
}

Do you know why?

@jkotas
Copy link
Copy Markdown
Member

jkotas commented Aug 16, 2017

Good catch. I guess that it is because of the ProjectN debugger is different today and it needs this to work. We should make the change in the shared file under #if CORECLR ifdef.

cc @dotnet/dotnet-diag

@stephentoub
Copy link
Copy Markdown
Member

We should make the change in the shared file under #if CORECLR ifdef.

Ok, I'll submit another coreclr PR to do that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants