@@ -624,20 +624,20 @@ impl File {
624
624
self . inner . datasync ( )
625
625
}
626
626
627
- /// Acquire an exclusive advisory lock on the file. Blocks until the lock can be acquired.
627
+ /// Acquire an exclusive lock on the file. Blocks until the lock can be acquired.
628
628
///
629
- /// This acquires an exclusive advisory lock; no other file handle to this file may acquire
630
- /// another lock.
629
+ /// This acquires an exclusive lock; no other file handle to this file may acquire another lock.
631
630
///
632
- /// If this file handle/descriptor, or a clone of it, already holds an advisory lock the exact
633
- /// behavior is unspecified and platform dependent, including the possibility that it will
634
- /// deadlock. However, if this method returns, then an exclusive lock is held.
631
+ /// If this file handle/descriptor, or a clone of it, already holds an lock the exact behavior
632
+ /// is unspecified and platform dependent, including the possibility that it will deadlock.
633
+ /// However, if this method returns, then an exclusive lock is held.
635
634
///
636
635
/// If the file not open for writing, it is unspecified whether this function returns an error.
637
636
///
638
- /// Note, this is an advisory lock meant to interact with [`lock_shared`], [`try_lock`],
639
- /// [`try_lock_shared`], and [`unlock`]. Its interactions with other methods, such as [`read`]
640
- /// and [`write`] are platform specific, and it may or may not cause non-lockholders to block.
637
+ /// This lock may be advisory or mandatory. This lock is meant to interact with [`lock`],
638
+ /// [`lock_shared`], [`try_lock_shared`], and [`unlock`]. Its interactions with other methods,
639
+ /// such as [`read`] and [`write`] are platform specific, and it may or may not cause
640
+ /// non-lockholders to block.
641
641
///
642
642
/// The lock will be released when this file (along with any other file descriptors/handles
643
643
/// duplicated or inherited from it) is closed, or if the [`unlock`] method is called.
@@ -674,18 +674,19 @@ impl File {
674
674
self . inner . lock ( )
675
675
}
676
676
677
- /// Acquire a shared (non-exclusive) advisory lock on the file. Blocks until the lock can be acquired.
677
+ /// Acquire a shared (non-exclusive) lock on the file. Blocks until the lock can be acquired.
678
678
///
679
- /// This acquires a shared advisory lock; more than one file handle may hold a shared lock, but
680
- /// none may hold an exclusive lock at the same time.
679
+ /// This acquires a shared lock; more than one file handle may hold a shared lock, but none may
680
+ /// hold an exclusive lock at the same time.
681
681
///
682
- /// If this file handle/descriptor, or a clone of it, already holds an advisory lock, the exact
683
- /// behavior is unspecified and platform dependent, including the possibility that it will
684
- /// deadlock. However, if this method returns, then a shared lock is held.
682
+ /// If this file handle/descriptor, or a clone of it, already holds an lock, the exact behavior
683
+ /// is unspecified and platform dependent, including the possibility that it will deadlock.
684
+ /// However, if this method returns, then a shared lock is held.
685
685
///
686
- /// Note, this is an advisory lock meant to interact with [`lock`], [`try_lock`],
687
- /// [`try_lock_shared`], and [`unlock`]. Its interactions with other methods, such as [`read`]
688
- /// and [`write`] are platform specific, and it may or may not cause non-lockholders to block.
686
+ /// This lock may be advisory or mandatory. This lock is meant to interact with [`lock`],
687
+ /// [`lock_shared`], [`try_lock_shared`], and [`unlock`]. Its interactions with other methods,
688
+ /// such as [`read`] and [`write`] are platform specific, and it may or may not cause
689
+ /// non-lockholders to block.
689
690
///
690
691
/// The lock will be released when this file (along with any other file descriptors/handles
691
692
/// duplicated or inherited from it) is closed, or if the [`unlock`] method is called.
@@ -722,24 +723,23 @@ impl File {
722
723
self . inner . lock_shared ( )
723
724
}
724
725
725
- /// Try to acquire an exclusive advisory lock on the file.
726
+ /// Try to acquire an exclusive lock on the file.
726
727
///
727
728
/// Returns `Ok(false)` if a different lock is already held on this file (via another
728
729
/// handle/descriptor).
729
730
///
730
- /// This acquires an exclusive advisory lock; no other file handle to this file may acquire
731
- /// another lock.
731
+ /// This acquires an exclusive lock; no other file handle to this file may acquire another lock.
732
732
///
733
- /// If this file handle/descriptor, or a clone of it, already holds an advisory lock, the exact
734
- /// behavior is unspecified and platform dependent, including the possibility that it will
735
- /// deadlock. However, if this method returns `Ok(true)`, then it has acquired an exclusive
736
- /// lock.
733
+ /// If this file handle/descriptor, or a clone of it, already holds an lock, the exact behavior
734
+ /// is unspecified and platform dependent, including the possibility that it will deadlock.
735
+ /// However, if this method returns `Ok(true)`, then it has acquired an exclusive lock.
737
736
///
738
737
/// If the file not open for writing, it is unspecified whether this function returns an error.
739
738
///
740
- /// Note, this is an advisory lock meant to interact with [`lock`], [`lock_shared`],
741
- /// [`try_lock_shared`], and [`unlock`]. Its interactions with other methods, such as [`read`]
742
- /// and [`write`] are platform specific, and it may or may not cause non-lockholders to block.
739
+ /// This lock may be advisory or mandatory. This lock is meant to interact with [`lock`],
740
+ /// [`lock_shared`], [`try_lock_shared`], and [`unlock`]. Its interactions with other methods,
741
+ /// such as [`read`] and [`write`] are platform specific, and it may or may not cause
742
+ /// non-lockholders to block.
743
743
///
744
744
/// The lock will be released when this file (along with any other file descriptors/handles
745
745
/// duplicated or inherited from it) is closed, or if the [`unlock`] method is called.
@@ -777,21 +777,22 @@ impl File {
777
777
self . inner . try_lock ( )
778
778
}
779
779
780
- /// Try to acquire a shared (non-exclusive) advisory lock on the file.
780
+ /// Try to acquire a shared (non-exclusive) lock on the file.
781
781
///
782
782
/// Returns `Ok(false)` if an exclusive lock is already held on this file (via another
783
783
/// handle/descriptor).
784
784
///
785
- /// This acquires a shared advisory lock; more than one file handle may hold a shared lock, but
786
- /// none may hold an exclusive lock at the same time.
785
+ /// This acquires a shared lock; more than one file handle may hold a shared lock, but none may
786
+ /// hold an exclusive lock at the same time.
787
787
///
788
- /// If this file handle, or a clone of it, already holds an advisory lock, the exact behavior is
788
+ /// If this file handle, or a clone of it, already holds an lock, the exact behavior is
789
789
/// unspecified and platform dependent, including the possibility that it will deadlock.
790
790
/// However, if this method returns `Ok(true)`, then it has acquired a shared lock.
791
791
///
792
- /// Note, this is an advisory lock meant to interact with [`lock`], [`try_lock`],
793
- /// [`try_lock`], and [`unlock`]. Its interactions with other methods, such as [`read`]
794
- /// and [`write`] are platform specific, and it may or may not cause non-lockholders to block.
792
+ /// This lock may be advisory or mandatory. This lock is meant to interact with [`lock`],
793
+ /// [`lock_shared`], [`try_lock_shared`], and [`unlock`]. Its interactions with other methods,
794
+ /// such as [`read`] and [`write`] are platform specific, and it may or may not cause
795
+ /// non-lockholders to block.
795
796
///
796
797
/// The lock will be released when this file (along with any other file descriptors/handles
797
798
/// duplicated or inherited from it) is closed, or if the [`unlock`] method is called.
0 commit comments