Re: libjpeg thread safe constraint is not must

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
On Tue, 1 Aug 2017, yzh杨振宏 wrote:

> Since GM is running on centos 7 in our case, and man pages clearly document setjmp() and longjmp() are thread safety:
>
>       │Interface               │ Attribute     │ Value   │
>       ├────────────────────────┼───────────────┼─────────┤
>       │setjmp(), sigsetjmp()   │ Thread safety │ MT-Safe │
>       ├────────────────────────┼───────────────┼─────────┤
>       │longjmp(), siglongjmp() │ Thread safety │ MT-Safe │
>       └────────────────────────┴───────────────┴─────────┘
> http://man7.org/linux/man-pages/man3/setjmp.3.html
>
> Does this mean we can use multi-thread for JPEG images on centos 7?
>
> I also note that setjmp/longjmp are also used in PNG err handle, and GM let user confirm and define a SETJMP_IS_THREAD_SAFE flag to open multi-thread feature. If core of the problem is not libjpeg itself but thread safety of setjmp/longjpm as you said, could GM use the same flag for JPEG multi-thread?

I just added support for SETJMP_IS_THREAD_SAFE in the JPEG coder in 
Mercurial.  Other formats which are declared unsafe are JPEG 2000 and 
TIFF, but they are declared unsafe for other reasons.

Bob

-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.