Changes between Version 2 and Version 3 of PJSUA_Locks


Ignore:
Timestamp:
Feb 13, 2008 7:53:34 PM (12 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PJSUA_Locks

    v2 v3  
    3636== Soft Deadlock == 
    3737 
    38 Although hard deadlock (where application just freezes) should never happen when the above guidelines are used, there may be cases when application gets a ''soft deadlock'' state. When this happens, application will not freeze permanently, but rather it will freeze for few seconds while PJSUA-LIB is trying to acquire the locks, and these message may appear in the log: 
     38Although hard deadlock (where application just freezes) should never happen when the above guidelines are used, there may be cases when application gets a ''soft deadlock'' state. When this happens, application will not freeze permanently, but rather it will freeze for few seconds while PJSUA-LIB is trying to acquire the locks, and these message may appear in the log afterwards: 
    3939 
    4040  ''Timed-out trying to acquire PJSUA mutex (possibly system has deadlocked) in pjsua_xxx'' 
     
    4646 1. when PJSUA-LIB tries to acquire locks with {{{acquire_call()}}} on behalf of the worker thread, it will fail to get them because the locks are currently being held by the callback thread (in step no 1 above). In this case, rather than ''deadlocking'' permanently, PJSUA-LIB will timeout after it retries acquiring the locks for few seconds, and returns PJ_ETIMEDOUT error to {{{acquire_call()}}} caller. 
    4747 
    48 This problem is not caused by PJSUA-LIB, and in fact PJSUA-LIB has helped us not to deadlock permanently. 
     48This is a generic application design problem, and is not caused by PJSUA-LIB (in fact PJSUA-LIB has helped us here by not deadlocking permanently). 
    4949 
    50 As for the solution, quoting the famous saying, I'll leave that as an exercise for the reader. ;-) 
     50As for the solution, quoting the famous saying: ''I'll leave that as an exercise for the reader''. ;-) 
    5151