Changes between Version 3 and Version 4 of Group_Lock


Ignore:
Timestamp:
Feb 25, 2013 9:54:27 AM (12 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Group_Lock

    v3 v4  
    157157If you after this find out that the leaking reference is caused by timer, you can enable timer heap debugging by setting {{{PJ_TIMER_DEBUG}}} to non-zero and call {{{pj_timer_heap_dump()}}} to dump the state of the timer heap including information about the source file and line number of code that registered currently active timer entries. 
    158158 
     159== Notes == 
     160 
     161=== Deadlock When Synchronizing to More Than One External Locks === #deadlock-externals 
     162 
     163Adding more than one external locks to a group lock may introduce deadlock potential. Consider the following example. 
     164 
     165 1. External lock EA and EB (read: external A and B) are added to group lock G, resulting in group lock's chain: {{{ {EA --> EB --> G} }}} 
     166 2. Thread 1 locks EA then G. The lock order then is: {{{ EA --> { EA --> EB --> G } }}} 
     167 3. Thread 2 locks EB then G. The lock order then is: {{{ EB --> { EA --> EB --> G } }}} 
     168 4. The lock orders in 2 and 3 are not uniform, potentially causing deadlock. 
     169 
     170 
     171 
     172 
    159173{{{ 
    160174#!html