On Wed, Oct 21, 2009 at 10:29 PM, Emil Berg <emilbergg at gmail.com> wrote: > Hello, > > I'm writing a class that wraps pjsua lib. > Should I call pj_thread_register() on the constructor of my class, so that > all of the calls to functions in pjsua will be attached to pjsip's threads? > If you're allowing your class to be called by arbitrary application/user threads, then calling pj_thread_register() on the constructor alone wouldn't be sufficient. You'd need to call pj_thread_register() on *every* method of your class. Alternatively, just tell the app developer to register their threads with you, then you can register it to pjlib. :) Cheers Benny