Method
__init__
(self, initial_bytes=None)
Source from the content-addressed store, hash-verified
| 878 | _buffer = None |
| 879 | |
| 880 | def __init__(self, initial_bytes=None): |
| 881 | # Use to keep self._buffer and self._pos consistent. |
| 882 | self._lock = Lock() |
| 883 | |
| 884 | buf = bytearray() |
| 885 | if initial_bytes is not None: |
| 886 | buf += initial_bytes |
| 887 | |
| 888 | with self._lock: |
| 889 | self._buffer = buf |
| 890 | self._pos = 0 |
| 891 | |
| 892 | def __getstate__(self): |
| 893 | if self.closed: |
Callers
nothing calls this directly
Tested by
no test coverage detected