Louis,

To share the log you have to mutex it, 
so place the call of cmsTakeProductName 
after the lock and just before writing 
to the log stream. 

Sorry, I agree having all functions 
reentrant would be nice, and probably 
that will happen at next major version 
bump. But right now there is no way to 
keep backwards compatibility other than 
providing new functions. This would 
pollute the API and make things even
more confusing.  

Honestly, I think those are corner cases. 

Regards

Marti Maria
The littleCMS project
www.littlecms.com



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Louis Solomon
[SteelBytes]
Sent: Saturday, December 30, 2006 3:31 AM
To: lcms-user
Subject: Re: [Lcms-user] pthread support in lcms 1.16

an example off the top of my head why funcs like cmsTakeProductName should 
be made thread safe ...

an image processing app that is given a batch of images to convert from one 
profile to another, and it is logging their original profile details as part

of the process.

Louis Solomon
www.SteelBytes.com

----- Original Message ----- 
From: "Marti Maria" <[EMAIL PROTECTED]>
To: "'Cyrille Berger'" <[EMAIL PROTECTED]>; 
<lcms-user@lists.sourceforge.net>
Sent: Friday, December 29, 2006 10:57 PM
Subject: Re: [Lcms-user] pthread support in lcms 1.16


>
> Hi Cyrille,
>
>> I wanted to know if pthread support in lcms 1.16 meant that the
>> functions in lcms were thread safe ?
>
> Yes, that is.
>
>> And especially if that meant that
>> it is now safe to share cmsHTRANSFORM between threads ?
>
> Yep.
>
> The details are: cache in 1.16 is now limited to
> each invocation of cmsDoTransform and stored in
> the stack. This eliminates 99,9% of chance of
> conflicts. For the remaining 0,1% you may turn
> on the pthread support by editing lcms.h, but in
> my testing it worked fine without that.
>
> Also, this applies only to transform logic.
> Functions that retrieve textual information
> (cmsTakeProductName and alike) are not thread
> safe, but I wonder why anybody would like
> to do so.
>
> Keep up your good work on Krita.
> Regards
>
> Marti Maria
> The littleCMS project
> www.littlecms.com
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Cyrille 
> Berger
> Sent: Friday, December 29, 2006 12:33 PM
> To: lcms-user@lists.sourceforge.net
> Subject: [Lcms-user] pthread support in lcms 1.16
>
> I wanted to know if pthread support in lcms 1.16 meant that the
> functions in lcms were thread safe ? And especially if that meant that
> it is now safe to share cmsHTRANSFORM between threads ?
>
> -- 
> Cyrille Berger
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share 
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Lcms-user mailing list
> Lcms-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lcms-user
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share 
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Lcms-user mailing list
> Lcms-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lcms-user 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to