Hi there, On 10/2/07, Kai Vehmanen <[EMAIL PROTECTED]> wrote: > Sofia-SIP is an event-driven library where you can have multiple event > loops, but each of those has to be accessed from at most one thread. > > So if you have a multithreaded application, you can: > - run multiple separate nua instance (with their own su_root), one per > thread, or > - have multiple threads, but concentrate all access to nua objects > (sharing a single su_root) to a single thread > > Now with your current design, su_root_run() might trigger calls to nua > code (from timers, network i/o, etc), while you could be at the same time > calling nua functions from other threads. This leads to potentially > entering the event loop in multiple places, and this is not supported (and > can lead to hard to debug errors). > > 1.12.4 allowed you to create the su_root object in one thread, and then > run it in another. This was changed in 1.12.6. But even with 1.12.4, you > weren't supposed to access nua objects from two threads at the same time! > This hasn't changed since 1.12.4 AFAIK.
I've been following this thread from a certain distance because I believed Jerry's problem was only related to calling nua_create and su_root_run from different threads. But if I understand what you are saying correctly, it means that I can't have su_root_run() in one thread and call nua_invite(), for example, from another thread, which my application does. Is this right? If that's so, I believe nua documentation is a bit misleading. Quoting the section 'Initialization and deinitialization': "If the application is not just responding to incoming SIP messages there must also be means to send messages to NUA. This can be handled for example by having a separate thread that calls NUA functions to send messages (...)" Isn't that somewhat opposed to what you explained? Thanks. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel