summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md18
1 files changed, 0 insertions, 18 deletions
diff --git a/README.md b/README.md
index 48401be..a4d69c1 100644
--- a/README.md
+++ b/README.md
@@ -214,24 +214,6 @@ the result, or ignoring it. The latter two methods return the number of elements
in the upcoming container, so that each element in an array, or key-value pair
in a map, can be unpacked or skipped individually.
-Each of these methods may optionally write the packed data it reads to a
-callback function:
-
-```py
- from io import BytesIO
-
- def distribute(unpacker, get_worker):
- nelems = unpacker.read_map_header()
- for i in range(nelems):
- # Select a worker for the given key
- key = unpacker.unpack()
- worker = get_worker(key)
-
- # Send the value as a packed message to worker
- bytestream = BytesIO()
- unpacker.skip(bytestream.write)
- worker.send(bytestream.getvalue())
-```
## Notes