[asterisk-dev] Feature Request: Macro LOCK
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Tue Aug 7 18:40:22 CDT 2007
On Tuesday 07 August 2007, Nicholas Blasgen wrote:
> MacroExclusive was discussed in my orginal post. Can't make a Dial()
> application MacroExclusive or no one will be able to execute the
> Dial() command. I was just looking for a way to make it so part of
> my code was Exclusive and part of it wasn't. I'm trying to keep all
> the code in the macro defined section, but I can't tell Asterisk
> which sections should be exclusive and which not. I guess I could
> always call an exclusive macro inside a normal macro.
You're certainly welcome to copy func_lock into 1.4 and use it there,
if you like. There's nothing currently about the code that would
exclude its use in 1.4 (although it most certainly will not work in
1.2).
Note that func_lock only permits a single lock to be held per channel
(although the total number of named locks is unlimited). This is mostly
intended as a safeguard against deadlocks.
--
Tilghman
More information about the asterisk-dev
mailing list