File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff 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
9090transition 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
You can’t perform that action at this time.
0 commit comments