Reduce thread count in ConcurrentHashMapTest to prevent system thread limit breach #2335
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The earlier number of threads,
65536
, is causing subprocess termination on Apple M3/16 GB/MacOS 15.1. This is understable since the OS thread limit per process is significantly lower(4096
as shown below).Reducing the thread count to
1024
to add some some margin of error for other platforms as well.1024
is practically already high enough for most real world use cases so this should be stress enough. But to somewhat compensate for the lower total thread count here, the number of iterations has been increased from100
to1000
.Its to be noted that other multi threaded tests in the same file are already using lower total thread counts(e.g.
32
here.