[asterisk-dev] Asterisk thread behaviour with channel driver

Paulo Garcia paulo.astdev at gmail.com
Mon Mar 24 16:14:38 CDT 2008


Hi,

First, I posted this message to irc but I realized that probably it should
be here instead...

I'm having troubles trying to understand the thread behaviour for the
channel drivers.

Here is the whole history:

My channel driver starts a thread to wait for the device driver/sdk events.

Everything goes well but due to my design, in my bridge function I have to
stop my playback functions and wait for an event certifying that the play
process is really done.

I'm doing it waiting for a flag being set in a while with a usleep inside.
The problem is that when I'm inside that loop, I cannot receive any events
from my SDK.

For my understanding , every channel runs in your own thread and since I
have a separated thread for receiving my events, why when I wait inside a
channel driver callback function, my other thread doesn't runs?

I tried to use ast_cond_timedwait() function as well but the result seems
the same.

Thanks in advance

-- 
--------------
Paulo Garcia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20080324/9e91f77f/attachment.htm 


More information about the asterisk-dev mailing list