Skip to content

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Sep 24, 2024

  • Delete special-casing of thread finalizer
  • Factor out Get/SetApartment of unstarted threads
  • Delete some dead code
  • Fix comments

- Delete special-casing of thread finalizer
- Factor out Get/SetApartment of unstarted threads
- Delete some dead code
- Fix comments
@dotnet-policy-service
Copy link
Contributor

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

{
_mayNeedResetForThreadPool = true;
}
_mayNeedResetForThreadPool = true;
Copy link
Member Author

Choose a reason for hiding this comment

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

This was not handling the case of finalizer threads.

{
public sealed partial class Thread
{
[ThreadStatic]
Copy link
Member Author

Choose a reason for hiding this comment

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

Dead code


LOG((LF_GC, LL_INFO10, "Finalizer thread starting...\n"));

#if defined(FEATURE_COMINTEROP_APARTMENT_SUPPORT) && !defined(FEATURE_COMINTEROP)
Copy link
Member Author

Choose a reason for hiding this comment

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

The condition was always false.

}
CONTRACTL_END;

// This method can be called on current thread only
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed the non-current thread callers to use SetApartmentOfUnstartedThread

@jkotas
Copy link
Member Author

jkotas commented Sep 24, 2024

Motivated by HMF->QCall conversion codereviews

@jkotas
Copy link
Member Author

jkotas commented Sep 24, 2024

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JulieLeeMSFT
Copy link
Member

@jkotas, all test legs failed in runtime-coreclr libraries-jitstress/20240924.1. PTAL.

@jkotas jkotas deleted the ApartmentState branch September 24, 2024 17:57
@jkotas
Copy link
Member Author

jkotas commented Sep 24, 2024

Similar set of failures was hit in https://dev.azure.com/dnceng-public/public/_build/results?buildId=815402&view=ms.vss-test-web.build-test-results-tab that did not include this change.

@jkotas
Copy link
Member Author

jkotas commented Sep 27, 2024

These failures should be fixed by #108169

sirntar pushed a commit to sirntar/runtime that referenced this pull request Sep 30, 2024
- Delete special-casing of thread finalizer
- Factor out Get/SetApartment of unstarted threads
- Delete some dead code
- Fix comments
@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 2024
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.

3 participants