Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: support getting the thread name #3345

Merged
merged 2 commits into from Mar 3, 2024

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Mar 3, 2024

Also organize the thread name tests a bit.

@RalfJung
Copy link
Member Author

RalfJung commented Mar 3, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 3, 2024

📌 Commit 4fdabe4 has been approved by RalfJung

It is now in the queue for this repository.

bors added a commit that referenced this pull request Mar 3, 2024
Windows: support getting the thread name

Also organize the thread name tests a bit.
@bors
Copy link
Collaborator

bors commented Mar 3, 2024

⌛ Testing commit 4fdabe4 with merge f4da8cc...

Some(Handle::Pseudo(PseudoHandle::CurrentThread)) => this.get_active_thread(),
_ => this.invalid_handle("SetThreadDescription")?,
};
// FIXME what is the right default thread name? Or should we raise an error?
Copy link
Contributor

Choose a reason for hiding this comment

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

The right default would be an empty string. Though in std that would be changed to <unnamed> anyways.

Copy link
Member Author

Choose a reason for hiding this comment

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

So on actual Windows it succeeds and returns an empty string when no name was that?
That's easy enough to do. Is this documented anywhere?

Yeah I know this is not observable on std.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this documented anywhere?

No.

@RalfJung
Copy link
Member Author

RalfJung commented Mar 3, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 3, 2024

📌 Commit bef7237 has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Mar 3, 2024

⌛ Testing commit bef7237 with merge cfa103d...

@bors
Copy link
Collaborator

bors commented Mar 3, 2024

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing cfa103d to master...

@bors bors merged commit cfa103d into rust-lang:master Mar 3, 2024
8 checks passed
@RalfJung RalfJung deleted the win-get-thread-name branch March 3, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants