Skip to content

Removed legacy ThreadLocal annotation on StringDesc's companion object - #755

Merged
Alex009 merged 1 commit into
icerockdev:developfrom
romanandreyvich:StringDesc-remove-threadLocal
Aug 22, 2024
Merged

Alex009 merged 1 commit into
icerockdev:developfrom
romanandreyvich:StringDesc-remove-threadLocal

Conversation

@romanandreyvich

Copy link
Copy Markdown

Motivation of this PR is the issue: #544

The problem is:
Because StringDesc's companion object marked as ThreadLocal it has different instances for each thread

Since Kotlin 1.8.* released we don't need to use ThreadLocal annotation because of new memory manager.

I've checked that everything works fine without ThreadLocal annotation.
Also all tests works good, ./local-check.sh and ./local-samples-check.sh are green :)

To test the mentioned issue (#544) is fixed, I've changed a sample a little bit.
Attaching a patch I've used:
patch.diff.zip

@griffinsorrentino

Copy link
Copy Markdown

+1 I was debugging this issue today and was minutes away from opening my own issue / PR for this. Thank you @romanandreyvich for beating me to it 😄

@Alex009
Alex009 self-requested a review August 21, 2024 01:53
@romanandreyvich

Copy link
Copy Markdown
Author

@Alex009 I really apologize for being persistent:)

Has this PR any chances to be merged this week?
It blocks my actual task, so it would be cool to know in advance:)

@Alex009 Alex009 added this to the 0.24.2 milestone Aug 22, 2024
@Alex009
Alex009 merged commit d1705db into icerockdev:develop Aug 22, 2024
@Alex009 Alex009 mentioned this pull request Aug 22, 2024
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.

3 participants