From: Andy H. <an...@jt...> - 2002-01-17 02:29:04
|
The quote from the user guide is, "To communicate errors reliably and support multi-threading, [icu] uses an error code parameter mechanism..." C++ Exceptions will work reliably in multi-threaded environments. Using an error code parameter rather than exceptions in ICU lets the C and C++ APIs share the same common error reporting mechanism. Also, ICU dates back to an era when exception support wasn't always reliable in C++ compilers. Reporting errors via a global variable (like errno) does not work in multi-threaded environments, and this is probably the source of the comment regarding support for multithreading by use of an error code parameter. -- Andy Heninger hen...@us... ----- Original Message ----- From: "Jörg Kaufmann" <Joe...@at...> To: <ic...@ww...> Sent: Wednesday, January 16, 2002 7:27 AM Subject: Error handling/ multi-threading question > Hi, > while reading the actual user guide, I found a short hint (page 35) that > error code parameter mechanism (instead of C++ exceptions) is used to > support multi-threading. > Do I missunderstand this section and there is no problem with > exceptions/MT or is there any problem I cannot see? (old compiler > support is another really good argument) > Actually I think, there's no problem to use exceptions and threads in my > programs. A short explanation would be fine. > > > Thanks in advance, > Joerg Kaufmann |