You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by y_...@tsmc.com on 2009/05/22 07:30:42 UTC
Is XMLPlatformUtils::Initialize safe ?
Hi ,
I have a c++ multi-thread application in AIX
In Multi-thread env , can i use for that ?
When client call functionA , system will create a new thread for
client exec functionA
call functionB , system will create a new thread
for client exec fucntionB
example :
functionA ()
{
xml_function () ;
}
functionB()
{
xml_function () ;
}
xml_function ()
{
try
{
XMLPlatformUtils::Initialize();
}
catch (const XMLException& toCatch)
{
char* message = XMLString::transcode(toCatch.getMessage());
XMLString::release(&message);
XMLPlatformUtils::Terminate();
return 1;
}
USE XML Logic
XMLPlatformUtils::Terminate()
}
Best Regards, Sincerely
---------------------------------------------------------------------------
TSMC PROPERTY
This email communication (and any attachments) is proprietary information
for the sole use of its
intended recipient. Any unauthorized review, use or distribution by anyone
other than the intended
recipient is strictly prohibited. If you are not the intended recipient,
please notify the sender by
replying to this email, and then delete this email and any copies of it
immediately. Thank you.
---------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
Re: Is XMLPlatformUtils::Initialize safe ?
Posted by David Bertoni <db...@apache.org>.
y_tzeng@tsmc.com wrote:
> Hi ,
> I have a c++ multi-thread application in AIX
>
> In Multi-thread env , can i use for that ?
No, you must synchronize the calls. The other option is to simply
initialize when your application starts, and terminate when it ends.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org