[redland-dev] Threads

Lou Sakey ljsakey at verizon.net
Sat Sep 5 00:21:52 CEST 2009


I do not believe that Redlands is completely thread safe.

-----Original Message-----
From: redland-dev-bounces at lists.librdf.org
[mailto:redland-dev-bounces at lists.librdf.org] On Behalf Of Brendan Hahn
Sent: Friday, September 04, 2009 12:34 PM
To: redland-dev at lists.librdf.org
Subject: [redland-dev] Threads

No response to my message of last week, so let me try again.  It's pretty
simple: librdf_cache_set_common locks the world mutex, calls
librdf_cache_cleanup, which calls librdf_cache_delete, which locks the world
mutex.  pthreads mutexes are non-recursive by default, thus deadlock.  So I
can fix this by setting PTHREAD_MUTEX_RECURSIVE at init time, but how was
this supposed to work?

Further, there's this from librdf_free_cache:
     LIBRDF_FREE(librdf_cache, cache);

   #ifdef WITH_THREADS
     pthread_mutex_unlock(cache->world->mutex);
   #endif

So I'm just not feeling confident about Redland's thread support in general.
Can anyone allay my concerns?

_______________________________________________
redland-dev mailing list
redland-dev at lists.librdf.org
http://lists.librdf.org/mailman/listinfo/redland-dev
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.409 / Virus Database: 270.13.77/2346 - Release Date: 09/04/09
17:51:00



More information about the redland-dev mailing list