[asterisk-dev] Proper use of locking.

Kevin P. Fleming kpfleming at digium.com
Thu Jul 19 16:42:47 CDT 2007


Derek Smithies wrote:

> In the email below, it seems that you are arguing there are read write 
> locks. But, is this on an entire list, or is this on elements in the list.
>  Thus, is it going to be possible for multiple threads to read from 
>  the same list at the same time ?

Yes, it will be possible for multiple threads to read from the same list
at the same time, which is not possible today using mutex protection for
those lists.

> It does appear that you guys are moving to reentant mutexes - it is a slow 
> process to change to a more reasonable mutexing system.

I've already said this twice, I don't know how I can say it again and
get the point across. Asterisk has *always* used recursive (reentrant)
mutexes since I have been working with it, and probably long before
that, possibly since it was first turned into a threaded application.

> And of the need to copy data (which is reported for logging (say)) and 
> then freeing the mutex in the minimum of time - is there any plan of work 
> in this direction ?

No, there is no plan to move in this direction at this time.

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)



More information about the asterisk-dev mailing list