[pjsip] Thread creations and terminations

buldozer at aufbix.org buldozer at aufbix.org
Sun Nov 18 12:15:48 EST 2007


 Hello,


 I came across a new problem with my pjsua-lib based application. The program
has to write some data to the database from within a callback (in my case from
on_call_state). As the program is DAO based, I came across a problem. Well, if
you want to use DAO databases, every thread should AfxDaoInit() before doing
anything with the database, and AfxDaoTerm(), before terminating a thread. Now
a problem arises - if I try to use the database from within a callback, that is
inside a different thread from the rest of a program. So - I thought it would be
nice to have something like on_thread_create (which would be called from a newly
created thread just after it has been created) and on_thread_terminate (called
from the thread, which is about to be terminated). To make it even nicer - it'd
be good to have this functionality within pjsua-lib.

 If someone (Benny?) would point me to the parts where the threads get created
and terminated, I wouldn't mind writing the code.


 Greets, Toni

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.





More information about the pjsip mailing list