[redland-dev] Is Redland thread safe?

David Wood dwood at itee.uq.edu.au
Fri Sep 8 14:00:43 UTC 2006


On 8 Sep2006, at 00:19, Sean E. McBride wrote:
> So, I=92m working on this webapp that uses Redland as a backend (with  =

> the Python bindings). When I started having multiple people test  =

> it, weird errors started to pop up, like objects would get  =

> strangely merged, morphed, etc. I=92ve been trying to figure out  =

> what=92s going on, and one thing I hit upon is the fact that the web  =

> server is threaded but Redland might not necessarily be thread  =

> safe. If I have a bunch of references to the same model in  =

> different threads and I=92m accessing it, adding statements, etc.  =

> should everything work properly?
>
>
>
> I was thinking that two =93objects=94 might get merged if you were  =

> creating statements with two blank nodes at a time and they somehow  =

> started referring to the same node. Is a node created with RDF.Node =

> () and then used in statements guaranteed to be different than  =

> another blank node made with RDF.Node() in another thread?
>
>
>
> Has anyone run into problems with this before? I=92m just trying to  =

> eliminate possible causes.

Hi Sean,

The release notes say that some simple thread support was added as of  =

release 0.9.13, but only for the classes URI and World.  You have to  =

use the configuration option --with-threads when you build Redland to  =

lock those classes.  Search for "thread" in:

   http://librdf.org/RELEASE.html

Dave Beckett posted to this list back in February 2005 to say, "Take  =

care with the thread code, it hasn't been updated or used for years  =

as far as I am aware, and it doesn't handle newer classes such as  =

serializer, query and query results at all."

   http://lists.gnomehack.com/pipermail/redland-dev/2005-February/ =

000818.html

Regards,
Dave




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.usefulinc.com/pipermail/redland-dev/attachments/20060908/=
0f818b27/attachment.html


More information about the redland-dev mailing list