[Asterisk-Dev] Is the ChanIsAvail command thread safe?
Kevin P. Fleming
kpfleming at digium.com
Tue Sep 13 08:19:51 MST 2005
hugolivude wrote:
> Curious whether the ChanIsAvail command is thread safe. By that I mean, if I
> use ChanIsAvail to determine which channel to use, can I be sure that it
> will still be available when I go to Dial it on the next line? It occurs to
> me that there's a possibility the channel could get used by a competing
> thread AFTER my thread has determined it is available and BEFORE my thread
> gets a chance to Dial.
This has nothing to do with 'thread safety' at all, please don't mis-use
terminology.
The simple answer to your question is no. ChanIsAvail only tells you
whether the channel is available, it does not make any attempt to 'lock'
it for your use.
More information about the asterisk-dev
mailing list