From: Travis Cross Date: Mon, 26 May 2014 22:57:12 +0000 (+0000) Subject: mod_fifo: Document node_thread_run() X-Git-Tag: v1.4.5~2^2~14^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c25c3deb923351ed33c86c2354da9957126df34;p=thirdparty%2Ffreeswitch.git mod_fifo: Document node_thread_run() --- diff --git a/src/mod/applications/mod_fifo/mod_fifo.c b/src/mod/applications/mod_fifo/mod_fifo.c index f8496a74f1..f1902eb636 100644 --- a/src/mod/applications/mod_fifo/mod_fifo.c +++ b/src/mod/applications/mod_fifo/mod_fifo.c @@ -1997,6 +1997,20 @@ static void find_consumers(fifo_node_t *node) switch_safe_free(sql); } +/*\brief Continuously attempt to deliver calls to outbound members + * + * For each outbound priority level 1-10, find fifo nodes with a + * matching priority. For each of those nodes with outbound members, + * run `find_consumers()` if the fifo node has calls needing to be + * delivered and not enough ready and waiting inbound consumers. + * + * In the event of nothing needing to be done, each cycle starts at + * priority 1 and ends at priority 10, yielding for one second + * afterward. We also yield after initiating outbound calls, starting + * again where we left off on the next node. + * + * We also take care of cleaning up after nodes queued for deletion. + */ static void *SWITCH_THREAD_FUNC node_thread_run(switch_thread_t *thread, void *obj) { fifo_node_t *node, *last, *this_node;