Re: [xml] side effects of thread-enabling libxml2





And the globals for the main thread will *not* be initialized
from the new xmlGlobal values, right?

 Why not ?

For instance, in apache mod_python (or any situation where
you don't control thread creation), the "main thread" has nothing
special, it's just the first one to import libxml2.
It is then used for normal processing.

That means that if  I want to set a global for all the threads,
I must initialize it "twice":

import libxml2
libxml2.lineNumbersDefault(1) # for the main (current) thread
libxml2.setGlobalLineNumbersDefault(1) # for other threads

-sbi






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]