multithreading - Is ImageMagick thread safe with `--without-threads` option? -


i load images imagemagick using multiple threads. safe when configured --without-threads option?

from forum post on imagemagick.org -- "thread safe ?":

imagemagick thread safe, perform thousands of tests before release , without valgrind.

this post includes sample unit test imagemagick uses

another post -- "what lose disabling threads?":

imagemagick works fine without threads. however, number of imagemagick language wrappers ... assume threaded environment , applications crash , burn when call imagemagick methods more 1 thread of execution. threads enabled, imagemagick applies numerous mutex locks serialize splay-tree, hash, list methods, generating wand ids, etc.

from third post "--disable-thread confusion":

imagemagick thread safe coder modules not (e.g. jpeg). if coder modules not thread safe serialize access module our own mutexes. more recent versions of imagemagick distinguish coder module thread support reading , writing (some modules threaded when reading image not writing or vise versa).

therefore, consensus seems imagemagick still largely thread-safe using --without-threads, consequence of slower execution , potential wrappers, libraries, or modules may not thread-safe (and "crash , burn").

responding directly question of mult-threaded reading, however, depends on library you're using -- e.g., if you're using jpeg delegate library, not thread-safe (source below).

libjpeg.txt:

note: jpeg library not thread-safe.


Comments

Popular posts from this blog

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -

How to run C# code using mono without Xamarin in Android? -