[xml] Thread check
- From: spinmar interfree it ()
- To: xml gnome org
- Subject: [xml] Thread check
- Date: 19 Nov 2002 14:16:32 -0000
Hi,
In my application I build a xml tree taking informations from diffrent sources: well I'd like to improve the
performance and so to use threads.
My system is linux red hat 8.0: libxml2 (rpm package) was installed by default. How can I know if the
libexml2 has been installed with the option --with threads?
I have different functions: each one parses a specific source and then adds the extracted informations in the
same xmlDocPtr.
Shall I use xmlMutexPtr?
I think that the strategy is very similar to apache one: in apache we have
static mutex *my_mutex = NULL;
.....
static void my_handler_init(....) {
...
my_mutex = ap_create_mutex(NULL);
...
}
static int my_handler(.....) {
...
(void)ap_acquire_mutex(my_mutex);
/* read/write some global data */
(void)ap_release_mutex(my_mutex);
....
}
In libxml2 shall I use:
xmlNewMutex
.......
xmlMutexLocK
/* read write global data */
xmlMutexUnlock
.......
?
Thanks
--Marco
-----------------------------------------------------
Salve, il messaggio che hai ricevuto
è stato inviato per mezzo del sistema
di web mail interfree. Se anche tu vuoi
una casella di posta free visita il
sito http://club.interfree.it
Ti aspettiamo!
-----------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]