Navigation Menu

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

Fix up race between NSThread setName and pthread_getname on the thread. #213

Merged
merged 1 commit into from Nov 19, 2018

Conversation

dmaclach
Copy link
Collaborator

No description provided.

@dmaclach dmaclach merged commit 17aaac6 into master Nov 19, 2018
@dmaclach dmaclach deleted the fixrace2 branch November 19, 2018 16:31
// If we run our "check" block too soon, we will check the value on the
// thread before it's been set.
// Therefore we loop over it with some sleep to give the thread a chance
// to update it's internals.
[workerThread_ gtm_performWaitingUntilDone:YES block:^{
XCTAssertEqualObjects([workerThread_ name], testName);
Copy link
Member

Choose a reason for hiding this comment

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

Actually, shouldn't this have come out? Otherwise the it can still fail even though the code below lets it sleep and eventually take effect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants