The wording of the thread safety level comments could be improved, especially when compared to the similar MPI levels. For the non-single levels, I am currently unsure what exactly the comments promise and require.
https://github.com/robertu94/libpressio/blob/master/include/pressio_compressor.h#L268-L275
- single: from my understanding, this requires either that there is only one thread (single level in MPI) or that the compressor plugin is only used from one thread (funnelled level in MPI)
- serialised: from my understanding, this requires that all uses of the compressor plugin (i.e. across all compressors) serialise their accesses, i.e. that there is a global mutex on the plugin
- multiple: from my understanding, this allows multiple threads to access the compressor plugin concurrently, but requires that each compressor is only used across threads in a serialised way, I.e. multiple compressors can exist across different threads, but each compressor on its own requires a mutex, but can be moved from one thread to the other
- there is currently no level to signal that each compressor instance can be accessed concurrently from multiple threads (and the same goes for other plugins)
The wording of the thread safety level comments could be improved, especially when compared to the similar MPI levels. For the non-single levels, I am currently unsure what exactly the comments promise and require.
https://github.com/robertu94/libpressio/blob/master/include/pressio_compressor.h#L268-L275