pjsua callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/13/08, Norman Franke <norman at myasd.com> wrote:
>
> And, as I found out the hard way, you need to be very careful when calling
> PJ functions that will lock things you may not know about. This gets trick
> with callbacks, since they have already locked things, so locking an
> app-lock poses issues (e.g. your DB lock, though you probably shouldn't be
> calling DB functions from a callback.) A main thread function would want to
> lock the app lock, but when it calls various PJ functions, it can deadlock
> with your callback. I sort of get around this by trying to not call any PK
> functions if I have an app lock.

Ouch sorry to hear that, hopefully the article helps understanding how
locking works a bit.

FYI I've just added a section about (soft)deadlock in the article, to
make it more complete: http://trac.pjsip.org/repos/wiki/PJSUA_Locks

cheers,
 -benny



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux