Skip to content

[Syntax] ThreadSafeCachingTests: Use a thread pool #7797

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

Merged
merged 1 commit into from
Feb 28, 2017
Merged

[Syntax] ThreadSafeCachingTests: Use a thread pool #7797

merged 1 commit into from
Feb 28, 2017

Conversation

bitjammer
Copy link
Contributor

@bitjammer bitjammer commented Feb 27, 2017

[Syntax] ThreadSafeCachingTests: Use a thread pool

Instead of spawning a thread across test iterations (whoops, out of
threads), use a thread pool of size 2. When turning off atomic caching,
this is enough to trigger a race in 5 iterations or fewer for me, so
10000 ought to be enough for most machines.

This should fix hitting the thread limit on Linux.

rdar://problem/30729901

@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test Linux

2 similar comments
@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test Linux

Instead of spawning a thread across test iterations (whoops, out of
threads), use a thread pool of size 2. When turning off atomic caching,
this is enough to trigger a race in 5 iterations or fewer for me, so
10000 ought to be enough for most machines.

This should fix hitting the thread limit on Linux.

rdar://problem/30729901
@bitjammer bitjammer changed the title Link -lpthread on Linux C++ unittests [Syntax] ThreadSafeCachingTests: Use a thread pool Feb 28, 2017
@bitjammer
Copy link
Contributor Author

OK, let's test a few more times.

@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test Linux

1 similar comment
@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test OS X

@bitjammer bitjammer merged commit 032d053 into swiftlang:master Feb 28, 2017
@bitjammer bitjammer deleted the rdar-30729901-link-pthread-linux-unittests branch February 28, 2017 17:26
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.

1 participant