Skip to content

Update setprecision docstring and add NEWS entry for thread-safe behavior #58605

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

Closed
wants to merge 21 commits into from

Conversation

arnavk23
Copy link
Contributor

@arnavk23 arnavk23 commented Jun 2, 2025

This pull request addresses documentation gaps related to the recent change in the setprecision function, which now uses ScopedValue to ensure thread safety.

Updated setprecision docstring in base/mpfr.jl to include information about the use of ScopedValue and the resulting thread-safe behavior.

Added a corresponding entry in NEWS.md to notify users of this improvement and its impact on multi-threaded usage.

These changes improve clarity for users regarding the function's behavior, especially in multi-threaded environments.

Closes #58456

Copy link

github-actions bot commented Jun 2, 2025

Hello! I am a bot.

Thank you for your pull request!

I have assigned @DilumAluthge to this pull request.

@DilumAluthge can either choose to review this pull request themselves, or they can choose to find someone else to review this pull request.

@nsajko nsajko added docs This change adds or pertains to documentation bignums BigInt and BigFloat labels Jun 2, 2025
@nsajko
Copy link
Contributor

nsajko commented Jun 2, 2025

I think you changed the wrong doc string. The ScopedValue change only applies to the method taking a callable as the first argument.

@DilumAluthge
Copy link
Member

@giordano, since you're reviewing this PR, I'll assign it to you, but let me know if you want me to find a different reviewer instead.

@DilumAluthge DilumAluthge assigned giordano and unassigned DilumAluthge Jun 2, 2025
@JeffBezanson
Copy link
Member

Despite the changes this is still simply not correct.

@arnavk23 arnavk23 deleted the news.md branch June 4, 2025 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bignums BigInt and BigFloat docs This change adds or pertains to documentation status: waiting for PR reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing NEWS entry for the use of ScopedValue in setprecision
6 participants