Skip to content

Commit 3899ffd

Browse files
committed
fixed sample usage in README
1 parent d11afa9 commit 3899ffd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ with Creator("test.zim").config_indexing(True, "eng") as creator:
135135

136136
```py
137137
lock = threading.Lock()
138-
creator = Creator("test.zim")
138+
with Creator("test.zim") as creator:
139139

140-
# Thread #1
141-
with lock:
142-
creator.add_item(item1)
140+
# Thread #1
141+
with lock:
142+
creator.add_item(item1)
143143

144-
# Thread #2
145-
with lock:
146-
creator.add_item(item2)
144+
# Thread #2
145+
with lock:
146+
creator.add_item(item2)
147147
```
148148

149149
## Building

0 commit comments

Comments
 (0)