[SR-Users] htable locking

Alex Balashov abalashov at evaristesys.com
Fri Nov 7 22:19:42 CET 2014


PS. I appear to have encountered the same deadlock problem as Savolainen 
Dmitri:

http://lists.sip-router.org/pipermail/sr-dev/2014-November/026046.html

On 11/07/2014 04:02 PM, Alex Balashov wrote:

> 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