File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,16 @@ macro_rules! async_file_ext {
46
46
/// locked.
47
47
fn lock_exclusive( & self ) -> Result <( ) >;
48
48
49
- /// Locks the file for shared usage, or returns an error if the file is
50
- /// currently locked (see `lock_contended_error`).
49
+ /// Locks the file for shared usage.
50
+ ///
51
+ /// Returns `Ok(true)` if the lock was acquired, `Ok(false)` if the file is currently
52
+ /// locked.
51
53
fn try_lock_shared( & self ) -> Result <bool >;
52
54
53
- /// Locks the file for exclusive usage, or returns an error if the file is
54
- /// currently locked (see `lock_contended_error`).
55
+ /// Locks the file for exclusive usage.
56
+ ///
57
+ /// Returns `Ok(true)` if the lock was acquired, `Ok(false)` if the file is currently
58
+ /// locked.
55
59
fn try_lock_exclusive( & self ) -> Result <bool >;
56
60
57
61
/// Unlocks the file.
Original file line number Diff line number Diff line change @@ -46,12 +46,16 @@ macro_rules! file_ext {
46
46
/// locked.
47
47
fn lock_exclusive( & self ) -> Result <( ) >;
48
48
49
- /// Locks the file for shared usage, or returns an error if the file is
50
- /// currently locked (see `lock_contended_error`).
49
+ /// Locks the file for shared usage.
50
+ ///
51
+ /// Returns `Ok(true)` if the lock was acquired, `Ok(false)` if the file is currently
52
+ /// locked.
51
53
fn try_lock_shared( & self ) -> Result <bool >;
52
54
53
- /// Locks the file for exclusive usage, or returns an error if the file is
54
- /// currently locked (see `lock_contended_error`).
55
+ /// Locks the file for exclusive usage.
56
+ ///
57
+ /// Returns `Ok(true)` if the lock was acquired, `Ok(false)` if the file is currently
58
+ /// locked.
55
59
fn try_lock_exclusive( & self ) -> Result <bool >;
56
60
57
61
/// Unlocks the file.
You can’t perform that action at this time.
0 commit comments