On date Monday 2008-09-08 11:36:29 +0200, Stefano Sabatini phoned this:
> On date Monday 2008-09-08 10:31:43 +0200, Stefano Sabatini wrote:
> > On date Monday 2008-09-08 10:08:39 +0200, Stefano Sabatini wrote:
> > > On date Friday 2008-09-05 12:10:10 +0200, Stefano Sabatini wrote:
> > > > On 9/5/08, Stefano Sabatini <[EMAIL PROTECTED]> wrote:
> > > > > Hi all,
> > > > >
> > > > > I have a multithreaded application, and I need to run the sofia-sip
> > > > > event loop not in the main process context, but in the context of a
> > > > > thread.
[...]

Well this time I checked the Gmane archive and I found this:
http://thread.gmane.org/gmane.comp.telephony.sofia-sip.devel/2534/focus=2536

Quoting Pekka from it:
|You can use threads w/ Sofia in two alternative ways:
|
|1/ You create thread by your self, and call su_root_create() by
|yourself. Then call su_root_run()/su_root_step() to process su_root_t
|stuff. When you want to exit from thread, you should call
|su_root_break() (if su_root_run()ing) and then su_root_destroy().
|
|2/ You call su_clone_start() and get su_clone_t reference. A new
|thread is created. When you'd want to get rid of that thread, you call
|su_clone_wait() from the main thread.

I can't opt for solution 1, since I need to create the root in the
main thread, then run it with a Run() command.

For the solution 2: when su_clone_start() is invoked, the init
function defined is executed and the main thread waits for its
termination, then how can I specify which function should execute the
new thread?

Regards.
-- 
Stefano Sabatini
http://www.reilabs.com

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to