On Wed, Jan 04, 2023 at 07:01:24PM +0000, Richard W.M. Jones wrote:
(5) "The application is responsible for thread-safety. No
thread
synchronization is necessary when a queue is only used from a single
thread. Proper synchronization is required when sharing a queue
between multiple threads."
Does this apply across multiple struct blkio handles? ie. Is there
now, or could there be in future, some global state which would be
corrupted by parallel calls across multiple handles?
This matters because we could use NBDKIT_THREAD_MODEL_SERIALIZE_REQUESTS
instead of NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS
(
https://libguestfs.org/nbdkit-plugin.3.html#Threads).
There is no global state.
If there is global state in the future then the user would be aware of
it (e.g. they would have to explicitly create "shared" blkio instances).
Stefan