[Freeswitch-users] Is Bgapi threadsafe?
johnrose at google.hm
Thu Oct 13 18:08:19 MSD 2011
OK thanks, you've answered my question. So basically calling the methods on
an ESL connection, Bgapi for example, from a client is not threadsafe, the
method calls should be exclusively locked when using multiple threads since
it's utilizing one socket. That makes sense for the one connection scenario.
> -----Original Message-----
> From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-
> Subject: Re: [Freeswitch-users] Is Bgapi threadsafe?
> wrong week to quit sniffing glue....
> correction to last sentence of previous email:
> and you **can't** do i/o on it from 2 threads at once naturally.
> On Wed, Oct 12, 2011 at 4:07 PM, Anthony Minessale
> <anthony.minessale at gmail.com> wrote:
> > oh but wait...
> > if you mean you want threads on your side to share it, I'd either give
> > them all their own socket or share one on a mutex cos it's a socket
> > and you can do i/o on it from 2 threads at once naturally.
> > On Wed, Oct 12, 2011 at 4:06 PM, Anthony Minessale
> > <anthony.minessale at gmail.com> wrote:
> >> yes since its a socket and the other side is properly threaded. If
> >> you are using the in-tree ESL lib the client also has race condition
> >> protection
> >> On Wed, Oct 12, 2011 at 1:06 PM, John Rose <johnrose at google.hm>
> >>> Does anyone know if calling Bgapi on an ESL connection is
> >>> threadsafe? Im calling it from ManagedESL via C# and have a lock
> >>> around it but would like to remove the lock if possible
> >>> John
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users