[asterisk-dev] [Code Review] Bridging API for Conference Bridge purposes
Russell Bryant
russell at digium.com
Mon Feb 16 07:34:45 CST 2009
Vadim Lebedev wrote:
> Le 16 févr. 09 à 04:08, Russell Bryant a écrit :
>> Just for the sake of discussion, the order that you unlock objects
>> doesn't actually matter. I suppose it's probably good practice to
>> unlock in the reverse order that you locked, but reversing it can
>> not cause a deadlock.
>>
>>
>
> Thread 1: Lock A Lock B , Unlock
> A, Lock A, Unlock A, Unlock B
> Thread 2:
> Lock A, Lock B
> =
> === Deadlock =======
Yes, you're right. What I was referring to was the simple case of "Lock
A, Lock B, Unlock A, Unlock B" vs. "Lock A, Lock B, Unlock B, Unlock A".
--
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list