Should I always call pj_thread_register ?

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

 



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



[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