Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 9c4c499

Browse files
authored
Update docstrings for ReadWriteLock tests (#12354)
Signed-off-by: Sean Quah <[email protected]>
1 parent 800ba87 commit 9c4c499

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

changelog.d/12354.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update docstrings for `ReadWriteLock` tests.

tests/util/test_rwlock.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def _start_reader_or_writer(
4040
4141
Returns:
4242
A tuple of three `Deferred`s:
43-
* A `Deferred` that resolves with `return_value` once the reader or writer
44-
completes successfully.
43+
* A cancellable `Deferred` for the entire read or write operation that
44+
resolves with `return_value` on successful completion.
4545
* A `Deferred` that resolves once the reader or writer acquires the lock.
4646
* A `Deferred` that blocks the reader or writer. Must be resolved by the
4747
caller to allow the reader or writer to release the lock and complete.
@@ -87,8 +87,8 @@ def _start_nonblocking_reader(
8787
8888
Returns:
8989
A tuple of two `Deferred`s:
90-
* A `Deferred` that resolves with `return_value` once the reader completes
91-
successfully.
90+
* A cancellable `Deferred` for the entire read operation that resolves with
91+
`return_value` on successful completion.
9292
* A `Deferred` that resolves once the reader acquires the lock.
9393
"""
9494
d, acquired_d, unblock_d = self._start_reader_or_writer(
@@ -106,8 +106,8 @@ def _start_nonblocking_writer(
106106
107107
Returns:
108108
A tuple of two `Deferred`s:
109-
* A `Deferred` that resolves with `return_value` once the writer completes
110-
successfully.
109+
* A cancellable `Deferred` for the entire write operation that resolves
110+
with `return_value` on successful completion.
111111
* A `Deferred` that resolves once the writer acquires the lock.
112112
"""
113113
d, acquired_d, unblock_d = self._start_reader_or_writer(

0 commit comments

Comments
 (0)