py_pjsua && destroy()

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

 



Yes, I do have a worker that polls handle_events every 50ms. Why 50ms?
Cos I saw on the example ... :D

The worker is not really a different thread since I am attaching that to
the GTK main loop using gobject.timeout_add function.

Do I have to remove the source before cleaning up?

The __del__ function is the destroyer, but my guess is that py_pjsua is
not blocking, so gtk.main_quit() simply kills the loop b4 anything else
gets done.

Thanks,

Mesquita

On Thu, 2008-03-13 at 21:18 +0000, Benny Prijono wrote:
> On 3/13/08, Jo?o Mesquita <jmesquita at contactnet.com.br> wrote:
> > I am doing
> >  py_pjsua.destroy()
> >  gtk.main_quit()
> 
> That's not exactly what I'm asking. In your script, do you have a
> worker thread? Or something that calls py_pjsua.handle_events()? Is
> so, then this worker thread needs to be stopped before you call
> py_pjsua.destroy().
> 
> >  If I wrap py_pjsua on another module/class and call py_pjsua.destroy()
> >  on the __del__ method, it simply quits and does no cleanup...
> 
> I'm not sure about this. Maybe py_pjsua.destroy() is not called at all?
> 
> >  What is the cons of doing the latter?
> >
> 
> You should make sure that py_pjsua.destroy() is called or otherwise
> things don't get cleaned up properly (dangling calls, dangling
> registration in the server, etc.).
> 
> cheers,
>  -benny
> 
> 
> >  Mesquita
> 
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
> 
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




[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