Skip to content

2.x: Remove double dash on RxThreadFactory thread names. #4383

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
Aug 21, 2016
Merged

2.x: Remove double dash on RxThreadFactory thread names. #4383

merged 1 commit into from
Aug 21, 2016

Conversation

JakeWharton
Copy link
Contributor

Also optimize name creation to avoid StringBuilder having to expand its underlying char[].

Also optimize name creation to avoid StringBuilder having to expand its underlying char[].
nameBuilder.append(prefix)
.append('-')
.append(incrementAndGet());
StringBuilder nameBuilder = new StringBuilder(prefix).append('-').append(incrementAndGet());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using the constructor initializes the underlying char[] to length + 16 instead of the default constructors size of 16 which almost always had to do an expansion to fit the prefix.

@codecov-io
Copy link

Current coverage is 69.64% (diff: 100%)

Merging #4383 into 2.x will decrease coverage by 0.02%

@@                2.x      #4383   diff @@
==========================================
  Files           449        449          
  Lines         32005      32004     -1   
  Methods           0          0          
  Messages          0          0          
  Branches       5108       5108          
==========================================
- Hits          22300      22290    -10   
- Misses         7566       7575     +9   
  Partials       2139       2139          

Powered by Codecov. Last update f738a85...4e3194b

@akarnokd akarnokd added this to the 2.0 RC 1 milestone Aug 21, 2016
@akarnokd akarnokd merged commit 3262f16 into ReactiveX:2.x Aug 21, 2016
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.

3 participants