mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
res_stasis: signal when new command is queued
res_statsis's app loop sleeps for up to .2s waiting on input to a channel before re-checking the command queue. This can cause delays between channel setup and bridge. This change is to send a SIGURG on the sleeping thread when a new command is enqueued. This exits the sleeping thread out of the ast_waitfor() call triggering the new command being processed on the channel immediately. Resolves: #362 UserNote: Call setup times should be significantly improved when using ARI.
This commit is contained in:
committed by
asterisk-org-access-app[bot]
parent
b99606955e
commit
2694792e13
@@ -1548,7 +1548,11 @@ int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Set this thread's id as the control thread id so that any
|
||||
new commands can signal out of this wait */
|
||||
control_set_thread(control, pthread_self());
|
||||
r = ast_waitfor(chan, MAX_WAIT_MS);
|
||||
control_set_thread(control, AST_PTHREADT_NULL);
|
||||
|
||||
if (r < 0) {
|
||||
ast_debug(3, "%s: Poll error\n",
|
||||
|
Reference in New Issue
Block a user