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

chore(arrow-atomic): Cleanup atomic code #3318

Merged
merged 5 commits into from
Dec 20, 2023
Merged

Conversation

kyay10
Copy link
Collaborator

@kyay10 kyay10 commented Dec 12, 2023

Only public api additions are internal helper functions. Some of them might be good to promote to public, but that's up to you!

Copy link
Member

@serras serras left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time, less repetition is always nicer :)

Comment on lines 75 to 81
/**
* while (true) as an expression.
*/
@PublishedApi
internal inline fun forever(block: () -> Unit): Nothing {
while (true) block()
}
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to move this function to some other file, to stress that it's shared between all implementations?

Copy link
Member

@nomisRev nomisRev left a comment

Choose a reason for hiding this comment

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

Looks good to me @kyay10.

I've personally never really cared about such code optimisations (in Arrow), since the older code was simpler to understand in exchange for 40 extra lines of code.

@serras
Copy link
Member

serras commented Dec 20, 2023

@kyay10 I've decided to remove forever, since it was leaking in the ABI, and go back to while(true)

@serras serras merged commit a4c4053 into arrow-kt:main Dec 20, 2023
10 checks passed
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