[Asterisk-Users] Thread-safe applications

Steven Critchfield critch at basesys.com
Mon Feb 23 10:14:35 MST 2004


On Mon, 2004-02-23 at 10:55, Ernest W. Lessenger wrote:
> At 08:31 AM 2/23/2004, you wrote:
> >On Monday 23 February 2004 10:15, Ernest W. Lessenger wrote:
> > > I'm writing an application for asterisk (really just a set of
> > > access commands to the builtin API), and I notice that a lot of
> > > existing applications are not thread-safe. Should they be? Should
> > > mine be?
> >
> >Could you elaborate, please?  What specific applications are not
> >thread-safe and what aspect makes them not thread-safe?
> 
> Whoops, you're right, the String Manipulation function I was looking at is 
> thread-safe (but some it it's variants aren't). Regardless, do Applications 
> need to be thread safe?

For inclusion in the main tree it should be, and you may get pummeled
about the head with a blunt object if someone is using it and it crashes
a main machine.

Why would you program something that isn't thread safe? From what I can
tell, it isn't much extra effort to do things the right way instead of
debuging crap later. 
-- 
Steven Critchfield  <critch at basesys.com>




More information about the asterisk-users mailing list