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 "Murphy, James" <Ja...@excelergy.com> on 2001/12/11 16:41:12 UTC
RE: XMLPlatformUtils::Terminate();
Call Terminate() only once for your entire application!! Terminate
dealocates globals that will NOT be reallocated on subsequent Initialize
calls. This includes the Mutex you are hitting.
Jim
-----Original Message-----
From: Shirish M. Kulkarni [mailto:shkulkar@ptc.com]
Sent: Tuesday, December 11, 2001 10:43 AM
To: xerces_c
Subject: XMLPlatformUtils::Terminate();
Hi,
I have the following requirement
* My application would initialize, instantiate & use the parser more
than once
* I am using XMLPlatformUtils::Initialize(); [ at the beginning ] and
XMLPlatformUtils::Terminate(); [ at the exit ] of the function, I have
written for the parsing
* I am facing a problem in my application getting locked ( at the
second call to the parse() method ) at the call to _mutex_lock as shown in
the following trace
XMLPlatformUtils::lockMutex(0x678757c, 0x8d24a40, 0xefff89e4, 0x6775a4d,
0x6775a4c, 0x1)
_mutex_lock(0x678757c, 0xc0, 0x1, 0x90c74f2, 0x6787130, 0x1)
_cmutex_lock(0x678757c, 0xee766c40, 0x0, 0x0, 0x8ba9d90, 0x0)
I have the following questions
* Are multiple running of the parser from the same application
feasible ?
* Is XMLPlatformUtils::Terminate(); guanteed to unlock all the mutex
locked by XMLPlatformUtils::Initialize();
* What is a guranteed way to achieve this requirement ?
* Any work-arounds ?
* After reading the documentation, I am finding that the call to
XMLPlatformUtils::Terminate(); is optional ? What does that mean ? - leave
the threads locked ??
--
With best regards,
Shirish