-
Notifications
You must be signed in to change notification settings - Fork 691
Added Flock
object for automatic unlock on drop.
#2170
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
Changes from 31 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
bdc7e8e
Added object for automatic unlock on drop.
coderBlitz 1740131
Added appropriate changelog file.
coderBlitz aa8369d
Fixed doc error on `Flock`.
coderBlitz a566bb2
Requested changes to make `fcntl::flock` private and OwnedFd instead …
coderBlitz 7912e88
Indent fix.
coderBlitz d234054
Removed doc links to private item, updated imports.
coderBlitz e0c53bb
More import fixes.
coderBlitz ad58d40
Format changes.
coderBlitz 647059d
Remove unused import for redox.
coderBlitz 7cf6765
Added `Flockable` trait per discussions, added tests for `Flock`.
coderBlitz 99e9f6c
Simplified flock error conditionals.
coderBlitz 32443fa
Added missing cfg flags for `Flockable`.
coderBlitz 81ca0e5
Added missing cfg flags for impl of `Flockable` on `File`.
coderBlitz 5704efe
Update src/fcntl.rs
coderBlitz f256883
Merge remote-tracking branch 'upstream/master'
coderBlitz 2103ec7
Updated `Flockable` comment per suggestion.
coderBlitz 5609d07
Finalized `FlockArg` as enum and removed TODO accordingly, removed fl…
coderBlitz 2eaca17
Implemented `Flockable` for `OwnedFd` as well.
coderBlitz 4919bba
Fixed linting error.
coderBlitz 91c9590
Updated changelog accordingly.
coderBlitz d61c038
Corrected errno logic in `Flock::lock`.
coderBlitz 40fda24
Properly dropped inner type for `Flock`.
coderBlitz b544cd1
Replaced `ManuallyDrop` with `Option` as inner `Flock` type to avoid …
coderBlitz 91273fb
Fixed linting errors.
coderBlitz 836986c
Removed unnecessary cfg condition, updated documentation.
coderBlitz 723c386
Modified Flock behavior for drop() and unlock().
coderBlitz 85b76ee
Reverted changes to original `flock()` and `FlockArg` for deprecation…
coderBlitz c470752
Refactored `Flock` to wrap T directly and avoid a double-free after `…
coderBlitz a28425b
Fixed linting errors.
coderBlitz 47e1f5d
More linting fixes.
coderBlitz 936e3ce
Fixed example code for `Flock::unlock()`.
coderBlitz bcb5880
Made requested changes.
coderBlitz 6dc7bed
Merge branch 'master' into master
coderBlitz b04334f
Removed duplicate import.
coderBlitz d3225bb
Format change.
coderBlitz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Added newtype `Flock` to automatically unlock a held flock upon drop. | ||
Added `Flockable` trait to represent valid types for `Flock`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Removed `fcntl::flock` in favor of new `Flock` wrapper. | ||
Removed unlock options from `fcntl::FlockArg` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.