[asterisk-bugs] [Asterisk 0016360]: LOCK behaves like trylock (not waiting for 3 seconds)
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Dec 2 02:49:46 CST 2009
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=16360
======================================================================
Reported By: peterh
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 16360
Category: Functions/func_lock
Reproducibility: always
Severity: minor
Priority: normal
Status: feedback
Asterisk Version: 1.6.2.0-rc6
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-12-01 03:58 CST
Last Modified: 2009-12-02 02:49 CST
======================================================================
Summary: LOCK behaves like trylock (not waiting for 3
seconds)
Description:
I thought LOCK will try to get the lock and wait up to 3 seconds to get the
lock.
First Caller A calls a context with a LOCK statement and waits.
Then Caller B calls the same context and i see that LOCK is finished
immediately.
======================================================================
----------------------------------------------------------------------
(0114509) peterh (reporter) - 2009-12-02 02:49
https://issues.asterisk.org/view.php?id=16360#c114509
----------------------------------------------------------------------
sorry posted wrong example (got influenza)
You are right -> please use LOCK instead of TRYLOCK:
But the results are the same (no wait for 3 seconds in LOCK)
exten => 221,1,GotoIf(${LOCK(mylock)}?:locked)
exten => 221,n,Noop(got lock)
exten => 221,n,Wait(30)
exten => 221,n,Hangup
exten => 221,n(locked),Noop(is locked)
exten => 221,n,Hangup
Issue History
Date Modified Username Field Change
======================================================================
2009-12-02 02:49 peterh Note Added: 0114509
======================================================================
More information about the asterisk-bugs
mailing list