Skip to content

Conversation

@max-charlamb
Copy link
Member

Resolves #122355

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 12, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

// Information about current task dispatching, to be used for async
// stackwalking.
[ThreadStatic]
internal static unsafe DispatcherInfo* t_dispatcherInfo;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it used from other places - can it be private?

Copy link
Member

@jkotas jkotas Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, it may look better for the DispatcherInfo to be a top-level type and have the static pointing the current one contained within the type. Something like:

internal struct AsyncDispatcherInfo
{
....

    [ThreadStatic]
    internal static unsafe AsyncDispatcherInfo* t_current; // Debugger depends on the exact name of this field.
...
}

@max-charlamb max-charlamb requested a review from jkotas December 16, 2025 19:18
@max-charlamb max-charlamb marked this pull request as ready for review December 16, 2025 19:19
Copilot AI review requested due to automatic review settings December 16, 2025 19:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the RuntimeAsyncTaskCore nested static class and promotes its contents to the top level, simplifying the code structure. The change refactors how async dispatcher information is organized without altering the functional behavior.

Key changes:

  • Moved DispatcherInfo struct from nested RuntimeAsyncTaskCore class to top-level as AsyncDispatcherInfo
  • Renamed static field from t_dispatcherInfo to t_current
  • Updated all references throughout the DispatchContinuations method to use the new type and variable names

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove RuntimeAsyncTaskCore

3 participants