Reset memoize to support streaming multiple objects.
By default (value_)from_reader closes the input stream. It is possible
to deserialize multiple pickle objects from a single stream by
implementing a custom reader.
This patch will reset the memoize at the beginning when a new object is
deserialized. Any refs would then point to the correct object inside the memoize.
We checked several approaches but this approach seems to fit best (support most
protocols) however this might not be the obvious place.
Reset memoize to support streaming multiple objects.
By default
(value_)from_reader
closes the input stream. It is possible to deserialize multiple pickle objects from a single stream by implementing a custom reader.This patch will reset the memoize at the beginning when a new object is deserialized. Any refs would then point to the correct object inside the memoize.
We checked several approaches but this approach seems to fit best (support most protocols) however this might not be the obvious place.