[SR-Users] htable locking

Alex Balashov abalashov at evaristesys.com
Fri Nov 7 22:02:49 CET 2014


The documentation for the htable module gives no guidance on whether 
sht_lock()/unlock() should be used in all situations when writing or 
reading from the htable. Should it be?

I was under the impression (not supported by anything said in the 
documentation) that read and write access to the htable is fundamentally 
thread-safe, i.e. it is safe to both read and write to the htable even 
if the potential exists for another worker process to do the same 
concurrently.

Is that not the case? If not, should there not be strong admonitions to 
use sht_lock/sht_unlock around concurrent operations--and it sounds like 
nearly all useful applications of the htable are essentially concurrent?

Thanks!

-- 
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States

Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/



More information about the sr-users mailing list