[redland-dev] Threads

Michael Stahl Michael.Stahl at Sun.com
Wed Sep 9 19:23:14 CEST 2009


Dave Beckett wrote:
> Michael Stahl wrote:
>> (oh, and it is indeed _the_ librdf_world; create only one instance per
>> process, and never free it; unfortunately it does not encapsulate its
>> dependencies very well, and freeing a librdf_world will e.g. result in
>> freeing the global data of libxml2, which makes other users of libxml2
>> rather unhappy)... of course, this is ultimately awful design on libxml2's
>> part: global variables are Evil(TM)...)
> 
> yes, libxml2 is a bit broke in this regard, especially in the area of error
> handlers which are mostly static unless you use some newer functions.

ahh, error handlers... for some reason those have not yet created a
problem for me... yet :)

> (Curl also has static parts but is properly usable by multiple threads as
> far as I can tell).
> 
> Raptor's the thing that deals with libxml and there are already some do/do
> not free flags for the error handler functions.  See
>   raptor_world_set_libxml_flags()
> if necessary we can add more and figure out a way for redland to pass this down.

this raptor_world is a rather recent invention, right?
looking at the documentation, i would assume that raptor_finish maybe
frees some global data of other libraries, but raptor_free_world
definitely does not. right? that would be nice...

michael

-- 
"You probably know that arrogance in computer science is measured in
 nano-Dijkstras." -- Alan Kay



More information about the redland-dev mailing list