Skip to content

Commit 4d9f843

Browse files
committed
amend merge commit
1 parent 9a352ae commit 4d9f843

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Doc/library/shelve.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Shelf objects support most of methods and operations supported by dictionaries
8989
(except copying, constructors and operators ``|`` and ``|=``). This eases the
9090
transition from dictionary based scripts to those requiring persistent storage.
9191

92-
Two additional methods are supported:
92+
The following additional methods are supported:
9393

9494
.. method:: Shelf.sync()
9595

@@ -98,20 +98,19 @@ Two additional methods are supported:
9898
dictionary on disk, if feasible. This is called automatically when
9999
:meth:`reorganize` is called or the shelf is closed with :meth:`close`.
100100

101+
.. warning::
102+
103+
When calling :meth:`sync`, *writeback* attribute is temporarily set to
104+
:const:`False` and other threads will stop updating the cache. As such,
105+
this method, and any method calling it, is **not** thread-safe.
106+
101107
.. method:: Shelf.reorganize()
102108

103109
Calls :meth:`sync` and attempts to shrink space used on disk by removing empty
104110
space resulting from deletions.
105111

106112
.. versionadded:: next
107113

108-
.. warning::
109-
110-
During the call to :meth:`!sync`, the *writeback* attribute is set to
111-
:const:`False` and other threads will stop updating the cache. As such,
112-
this method is **not** thread-safe.
113-
114-
115114
.. method:: Shelf.close()
116115

117116
Synchronize and close the persistent *dict* object. Operations on a closed

0 commit comments

Comments
 (0)