From: Mage Date: 2006-10-12T22:15:46+09:00 Subject: Re: xml/libxml thread safety Ross Bamford wrote: > On Thu, 2006-10-12 at 01:58 +0900, Mage wrote: > >> my simple question is that is libxml thread-safe? I would like to use it >> in production environment. >> > > (I assume you mean libxml-ruby, rather than libxml itself?) > True. > The simple answer is probably not. We do have an open bug[1] regarding > cross-thread synchronisation, and though I've been unable to reproduce > it so far, I take that to mean it's probably platform/configure/compiler > specific. Most of the other open bugs pertain to pointer handling, and > have the potential to get 'interesting' in a multi-threaded program. > I simply want to generate an xml file with root 'ads' and nodes 'ad' (and subnodes of course). Since the generation uses network traffic and image manipulation I think multithreading will enchant the performance. Should I create every 'ad' node with Monitor.synchronize? Is this enough? The subnodes of 'ad' nodes won't share any data. Mage