Hi, I'm forwarding this to mailing list... could be interesting for someone else.
> I have been looking through some of the LCMS code and it seems like it is > not > thread-safe. In particular I looked at > > cmsTakeProductName > cmsTakeProductDesc > cmsTakeProductInfo > > all of which have static chars defined that could cause threading issues. > Is there a particular reason why these are set as statics? What would > happen if I would just change that. Yes, you are right. Those functions are NOT thread safe, since they write to a static buffer. However, those functions are ment to be used on UI only. The transform code is thread safe with USE_C method. I did check on a multiprocessor machine and did work. And you can change them if wish so... I used the static buffer just for simplicity sake. Nothing prevents to use a buffer pointer as a parameter, for example. But please note that those functions would be very rarely used on separated threads. About the "nDoAbort". This is supposed to be a global setting. Probably a multithreaded application would replace whole error handling by its own. Is as easy as write repacements for cmsSignalError() and cmsErrorAction(). Regards, Mart� Maria The little cms project http://www.littlecms.com [EMAIL PROTECTED] ----- Original Message ----- From: "Dhiraj Kacker" <[EMAIL PROTECTED]> To: "'Mart� Maria'" <[EMAIL PROTECTED]> Sent: Tuesday, March 05, 2002 12:09 AM Subject: is LCMS thread safe? > Hi Marti, > > I have been looking through some of the LCMS code and it seems like it is > not > thread-safe. In particular I looked at > > cmsTakeProductName > cmsTakeProductDesc > cmsTakeProductInfo > > all of which have static chars defined that could cause threading issues. > Is there a particular reason why these are set as statics? What would > happen if I would just change that. > > Also in the error handling the gloabal variable "nDoAbort" is used making > that too risky to use with multiple threads. > > Thoughts? > > -Dhiraj > > _______________________________________________ Lcms-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/lcms-user
