Dear Sir ,
「Server Main」--> is application main() function
the entry point is ---->>
start_threads_and_wait_for_them_to_finish();
so,i need do again ( XMLPlatformUtils::Initialize and
XMLPlatformUtils::Terminate )
in start_threads_and_wait_for_them_to_finish() ?
Best Regards, Sincerely
|--------------------------------->
| David Bertoni |
| <[email protected]>|
| |
| |
| 2009/05/24 上午 12:44|
| |
| |
| Please respond to |
| [email protected]|
| rg |
| |
|--------------------------------->
>----------------------------------------------------------------------------------------------------------------------|
|
|
|
|
|
To|
| [email protected]
|
|
cc|
|
|
|
Subject|
| Re: Is XMLPlatformUtils::Initialize safe ?
|
|
|
|
|
|
|
|
|
|
|
>----------------------------------------------------------------------------------------------------------------------|
[email protected] wrote:
>> [email protected] 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.
>
> hi, like this ?
> In this sample , xml_function will core dump in first XML code ( XMLCh *
> XML_Core = XMLString::transcode("Core") )
> Initialize and terminate have only once in Server Main ?
I don't know what "Server Main" is. There is a main() function in C++
which is the entry point for every program:
int
main(int argc, char* argv[])
{
try
{
XMLPlatformUtils::Initialize();
}
catch (const XMLException& toCatch)
{
std::cerr << "Failed to initialize the Xerces-C library.\n";
return 1;
}
start_threads_and_wait_for_them_to_finish();
XMLPlatformUtils::Terminate();
return 0;
}
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------------
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.
---------------------------------------------------------------------------