Skip to content

thread: add windows support for determining whether we are on the test thread #18669

Closed

Description

@jmarantz

To make it possible to write reliable asserts that determine whether we are on the main or test thread, it's best to have platform support for determining whether the current thread descends from main().

https://stackoverflow.com/questions/4867839/how-can-i-tell-if-pthread-self-is-the-main-first-thread-in-the-process suggests mechanisms to do this on Linux and Apple, but we don't know how to do this in Windows.

This is not a blocker as we can simply skip running such asserts in Windows, aided by macros in thread.h defined in #18557 . However it means that thread-sanity cannot easily be checked while developing on Windows. It will be checked when running CI though.

Activity

  1. github-actions commented on Nov 18, 2021

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

  2. added
    stale
    on Nov 18, 2021
  3. github-actions commented on Nov 25, 2021

    @github-actions

    This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

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

Metadata

Metadata

Assignees

Labels

area/windowsstale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions