8000 Remove broken example · fried/msgpack-python@2495099 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2495099

Browse files
committed
Remove broken example
1 parent 1bd6fc3 commit 2495099
Copy full SHA for 2495099

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

README.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -214,24 +214,6 @@ the result, or ignoring it. The latter two methods return the number of elements
214214
in the upcoming container, so that each element in an array, or key-value pair
215215
in a map, can be unpacked or skipped individually.
216216

217-
Each of these methods may optionally write the packed data it reads to a
218-
callback function:
219-
220-
```py
221-
from io import BytesIO
222-
223-
def distribute(unpacker, get_worker):
224-
nelems = unpacker.read_map_header()
225-
for i in range(nelems):
226-
# Select a worker for the given key
227-
key = unpacker.unpack()
228-
worker = get_worker(key)
229-
230-
# Send the value as a packed message to worker
231-
bytestream = BytesIO()
232-
unpacker.skip(bytestream.write)
233-
worker.send(bytestream.getvalue())
234-
```
235217

236218
## Notes
237219

0 commit comments

Comments
 (0)
0