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
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@google.hm> wrote:
Does anyone know if calling Bgapi on an ESL connection is threadsafe? I’m calling it from ManagedESL via C# and have a lock around it but would like to remove the lock if possible…
John
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
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@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@google.hm> wrote:
Does anyone know if calling Bgapi on an ESL connection is threadsafe? I’m calling it from ManagedESL via C# and have a lock around it but would like to remove the lock if possible…
John
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
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@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@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@google.hm> wrote:
Does anyone know if calling Bgapi on an ESL connection is threadsafe? I’m calling it from ManagedESL via C# and have a lock around it but would like to remove the lock if possible…
John
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
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. John
-----Original Message----- From: freeswitch-users-bounces@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@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@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@google.hm> wrote:
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
and don't forget to sniffing glue.. 8o) ----- Original Message ----- From: "John Rose" <johnrose@google.hm> To: "'FreeSWITCH Users Help'" <freeswitch-users@lists.freeswitch.org> Sent: Thursday, October 13, 2011 10:08 AM Subject: Re: [Freeswitch-users] Is Bgapi threadsafe? 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. John
-----Original Message----- From: freeswitch-users-bounces@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@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@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@google.hm> wrote:
Does anyone know if calling Bgapi on an ESL connection is threadsafe? I'm calling it from ManagedESL via C# and have a lock around it but would like to remove the lock if possible.
John
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Make sure there is an ample supply of coffee and Elmer's BEFORE checking in the code.
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch- users-bounces@lists.freeswitch.org] On Behalf Of Madovsky Sent: Thursday, October 13, 2011 11:30 AM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Is Bgapi threadsafe?
and don't forget to sniffing glue.. 8o)
----- Original Message ----- From: "John Rose" <johnrose@google.hm> To: "'FreeSWITCH Users Help'" <freeswitch-users@lists.freeswitch.org> Sent: Thursday, October 13, 2011 10:08 AM Subject: Re: [Freeswitch-users] Is Bgapi threadsafe?
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.
John
-----Original Message----- From: freeswitch-users-bounces@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@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@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@google.hm> wrote:
Does anyone know if calling Bgapi on an ESL connection is threadsafe? I'm calling it from ManagedESL via C# and have a lock around it but would like to remove the lock if possible.
John
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Anthony Minessale
-
John Rose
-
Madovsky