-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change
RwLock::try_lock()
to return Result<bool>
Previously `try_lock()` would return `Ok(())` or `Err(Error)`. This resulted in `Error::Busy` coming back in `Err()` when another thread had the lock. Another thread owning the lock in a `try_lock()` call is expected behavior and isn't a traditional _error_. Now `try_lock()` returns a `bool` in normal expected operation to indicate if the lock was acquired or not.
- Loading branch information
1 parent
2ab6846
commit 599094d
Showing
2 changed files
with
23 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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 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