Skip to content

Change File::try_lock() and try_lock_shared() to return io::Result<()> #140718

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cberner
Copy link
Contributor

@cberner cberner commented May 6, 2025

This PR changes the signatures of File::try_lock and File::try_lock_shared as requested by @rust-lang/libs-api in this discussion: #130994 (comment)

These methods are unstable under the "file_lock" feature. The related tracking issue is #130994

@rustbot
Copy link
Collaborator

rustbot commented May 6, 2025

r? @thomcc

rustbot has assigned @thomcc.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 6, 2025
@joshtriplett
Copy link
Member

This looks good to me, pending the question about Windows.

@rustbot rustbot added the O-windows Operating system: Windows label May 7, 2025
@cberner
Copy link
Contributor Author

cberner commented May 13, 2025

I think the question about Windows has been resolved now.

r? @joshtriplett

@rustbot rustbot assigned joshtriplett and unassigned thomcc May 13, 2025
try_lock() and try_lock_shared() do not need to handle these per the discussion in rust-lang#140718 (comment)
cberner added a commit to cberner/rust that referenced this pull request May 20, 2025
try_lock() and try_lock_shared() do not need to handle these per the discussion in rust-lang#140718 (comment)
cberner added a commit to cberner/rust that referenced this pull request May 20, 2025
try_lock() and try_lock_shared() do not need to handle these per the discussion in rust-lang#140718 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants