[Freeswitch-dev] Additional support for synchronization functions

Anthony Minessale anthony.minessale at gmail.com
Tue Jun 1 15:46:59 PDT 2010

if you are going to go to that much trouble, you may want to learn the C
side of FS coding.
C++ also is valid in modules.

I already was leaning away from this global variable thing because it's not
enterprise scalable (N-dimensional) but it was harmless to add the patch.

On Tue, Jun 1, 2010 at 4:00 PM, David Swardstrom <dswardstrom at remotelink.com
> wrote:

> I got so involved in getting the proposed optional third parameter to
> setGlobalVariable() that I did not consider all of the possibilities.
> Using the change along with getGlobalVariable() is ok for data that
> would only change or for data that does not need to be completely unique.
> I also have a need to have a global counter that can both be incremented
> and decremented. This counter is designed to give me more control over the
> number of calls than the current mod_limit will provide.
> This would be used during a period where they may be several calls
> either entering the system, exiting the system, or both.
> It would be nice to have routines that would just increment or decrement
> safely. They would be much faster.
> I have spent the last couple of years working with Visual Studio and C++.
> The natural solution I would take in this situation would be to use
> InterlockedIncrement() and InterlockedDecrement().
> In this environment I don't think I want to propose this.
> What I would like to propose is the following set of routines
> (using JavaScript notation):
> // Initialize the counter to a specified value
> initGlobalCounter(string name of variable, initial value);
> // Add a value to the global counter
> addGlobalCounter(string name of variable, value to add);
> // Subtract a value from the global counter
> reduceGlobalCounter(string name of variable, value to subtract);
> I am open to suggestions as to names of the routines.
> Even though all I need (now) is increment and decrement, since
> the code will need to use the Global Variable Mutex locks, it
> might as will be more general.
> Regards,
> Paul David Swardstrom
> _______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> 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 at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20100601/be46bbb5/attachment.html 

More information about the FreeSWITCH-dev mailing list