diff options
author | David Robillard <d@drobilla.net> | 2007-09-20 16:21:35 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-09-20 16:21:35 +0000 |
commit | 8eb2505498ba0e51f0d861a92a365e1766d43b76 (patch) | |
tree | 86e86e6ccadeaf1a257b6bf368b30c5165563f4a /src/RDFQuery.cpp | |
parent | 23df76c6037cc0719c6b590dd49941815367e3c8 (diff) | |
download | raul-8eb2505498ba0e51f0d861a92a365e1766d43b76.tar.gz raul-8eb2505498ba0e51f0d861a92a365e1766d43b76.tar.bz2 raul-8eb2505498ba0e51f0d861a92a365e1766d43b76.zip |
Add locking support to RDF stuff for dealing with concurrent librdf use.
git-svn-id: http://svn.drobilla.net/lad/raul@739 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/RDFQuery.cpp')
-rw-r--r-- | src/RDFQuery.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/RDFQuery.cpp b/src/RDFQuery.cpp index dc41f56..41aa918 100644 --- a/src/RDFQuery.cpp +++ b/src/RDFQuery.cpp @@ -30,6 +30,8 @@ namespace RDF { Query::Results Query::run(World& world, Model& model, const Glib::ustring base_uri_str) const { + Glib::Mutex::Lock lock(world.mutex()); + //cout << "\n**************** QUERY *******************\n"; //cout << _query << endl; //cout << "******************************************\n\n"; @@ -65,7 +67,7 @@ Query::run(World& world, Model& model, const Glib::ustring base_uri_str) const librdf_node* value = librdf_query_results_get_binding_value(results, i); if (name && value) - bindings.insert(std::make_pair(std::string(name), Node(value))); + bindings.insert(std::make_pair(std::string(name), Node(world, value))); } result.push_back(bindings); |