Reading from an `Object` via `read` already uses a context manager to manage the read-only bind mount and also maintain a count of currently active readers. With this an attempt to start a new `write` operation while readers were active can be detected and an exception is throw. Since `write` was not introducing a context the inverted situation, i.e. reads while a write is ongoing, was not possible to detect. This commit therefore introduces a context also for `.write` so that we can enforce the policy to have either many readers but no writers, or just one writer and no readers. A bind mount is also used for write (in read-write mode) to hide the internal path of the tree. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| api.py | ||
| buildroot.py | ||
| loop.py | ||
| objectstore.py | ||
| pipeline.py | ||
| remoteloop.py | ||
| sources.py | ||
| tmpfs.py | ||
| treesum.py | ||