fuse: add thread/async safety warning

This commit is contained in:
Thomas Waldmann 2026-01-03 19:45:39 +01:00
parent 646f279062
commit 4eed3ecd5b
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -1,3 +1,18 @@
"""
FUSE filesystem implementation for `borg mount`.
IMPORTANT
=========
This code is only safe for single-threaded and synchronous (non-async) usage.
- llfuse is synchronous and used with workers=1, so there is only 1 thread,
and we are safe.
- pyfuse3 uses Trio, which only uses 1 thread, but could use this code in an
asynchronous manner. However, as long as we do not use any asynchronous
operations (like using "await") in this code, it is still de facto
synchronous, and we are safe.
"""
import errno
import functools
import io