I am using libflif_dec.so in Rust through FFI. Code looks roughly like this. My code converts grayscale flif images to PNM with some processing. In single thread it works without problems, but when I use 3-4 threads to parallelize computations, for 1-2 first images in the queue FLIF decoder returns empty image (on some images it's zeroed pixels, on other equal to 15). Is there some multi-threading restrictions for libflif_dec.so or what else could cause this problem?
I am using
libflif_dec.so
in Rust through FFI. Code looks roughly like this. My code converts grayscale flif images to PNM with some processing. In single thread it works without problems, but when I use 3-4 threads to parallelize computations, for 1-2 first images in the queue FLIF decoder returns empty image (on some images it's zeroed pixels, on other equal to 15). Is there some multi-threading restrictions forlibflif_dec.so
or what else could cause this problem?