On Tue, Jul 26, 2011 at 6:40 PM, Shaun Simpson <shaun.simp...@crsltd.com>wrote:

> Hi,****
>
> ** **
>
> Looking around I have read that the C equivalent Jpeglib is not thread
> safe. ****
>
> I believe that the Pascal code is derived from the C.****
>
> ** **
>
> Is the Free Pascal implementation of Jpeglib is thread safe?****
>
> I am using a class similar to FPReadJPEG and FPWriteJPEG from multiple
> threads, do I need some form of locking?****
>
> ** **
>
>

It's an interesting question. Seems like the places that mention thread
non-safety, mean something different, for example

>From http://www.freedesktop.org/wiki/Software/libjpeg
(Note: the JPEG library currently is not thread-safe. You must not call
jpeg_consume_input() from one thread of control if a different library
routine is working on the same JPEG object in another thread.)

So I suppose when you're talking about different jpeg files, there should be
no problem, at least I'm not aware of IJG code to be using global variables
that can be a real tread in this case

Max Vlasov
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to