Page 1 of 1
Question about thread support
Posted: 2014-01-19T23:01:29-07:00
by zhcn381
hi all,
Why process like GetImageEncoder() and GetImageDecoder() need to be mutex protected if no thread_support?
Re: Question about thread support
Posted: 2014-01-20T03:57:16-07:00
by magick
Assume a user program that reads multiple jpeg images, each in a different thread. The JPEG library does not support threading, so ImageMagick must ensure only one of these threads access the JPEG library at a time. Without the mutex, it is possible that multiple instances of the JPEG library will run in parallel causing an unknown run-time exception.
Re: Question about thread support
Posted: 2014-01-22T18:43:43-07:00
by zhcn381
thank you magick.