task scheduler: Wait on tasks to exit rather than sleep in loop.Revision of switch_scheduler_task_thread_stop() to wait on the condition
variable for all tasks to complete rather than simply spinning in a loop
with sleeps.
This change also moves the deallocation into
switch_scheduler_task_thread_stop(). The reason for the change is that
the task_thread may be stuck in the middle of a hung task and cannot
delete tasks on its own, or the task_thread may have...
task scheduler: Add comment to switch_scheduler_del_task_id()Add a comment to the aforementioned function questioning the purpose of
an error condition.
task scheduler: Do not queue events.There is no longer a purpose to the event queue, events can safely be
fired as generated. The main loop no longer waits on the event queue to
be woken up.
task scheduler: Split task execution and rescheduling functions.Specifically, the task_container members should be protected by the
task_mutex. Splitting task execution and rescheduling into to functions
allows for descrimination of locking to only rescheduling. Also, this
allows us to switch the task mutex to be non-recursive.
task scheduler: Wait for timeout, rather than fix amount in loop.Rather than spin the task thread loop every half second, calculate the
longest the loop can wait an wait on the condition variable for that
amount. This reduces unneeded spins of the loop and actually improves
latency of some tasks. If a task becomes ready after having being
iterated over, but before main loop body is entered, previously a delay
of a half second always occured. Now, the loop wi...
task scheduler: Merge globals.running and globals.in_threadThese two flags describe what is essentiall the same condition.
Likewise, the treatment of threaded vs non-threaded tasks in
switch_scheduler_del_task_id() makes no sense.
task scheduler: Wait on a condition variable rather than queue.Rather than have the worker thread block on a queue of events, have it
block waiting on a condition variable. This design has three advantages.
Firstly, as not all events which require the worker thread to spin loop
enqueue events (task deleted, task completed) the loop is set to spin
twice a second to pick up such events and provide the required task
scheduling time granularity. By having a c...
Add missing CURLOPT_NOSIGNAL optionsTo work correctly in a multi-threaded environment, curl needs to be
used with CURLOPT_NOSIGNAL set to 1. If it's left at zero, the
default, then curl will use signals to deal with timeouts which will
often result in a crash.
ref: http://curl.haxx.se/libcurl/c/libcurl-tutorial.html#Multi-threading
ref: http://curl.haxx.se/libcurl/c/CURLOPT_NOSIGNAL.html
ref: http://stackoverflow.com/questions/...
Make example commit look like git log outputThis makes it visually clearer what the reader is looking at and
highlights that we want a real name as the author name.
Use preformatted text for example commit messageWe want to highlight that lines are hard wrapped in a commit message,
and using the typical Markdown blockquote syntax fails to achieve
that.
add buffer_seconds param to shout filehandles to override the original default of 1 and remove previous code to attempt to buffer several seconds of audio in the open routine. Any experiencing jittery playback from slow shout destinations should add {buffer_seconds=N} to the file path to increase the amount of time allotted for buffering when no audio is discovered on the wire
don't reset when video floor is lockedwhen video floor is locked by a member, changing audio floor on del_member
will cause the video floor lock cleared unexpectedly, this commit fixes that.
Merge pull request #55 in FS/freeswitch from ~DDRAGIC/freeswitch:bugfix/FS-6821-mod_gsmopen-wrong-interface-name-in-log to master* commit 'f262dbce948e6043d48d7859da00fa7db5b47585':
FS-6821 mod_gsmopen: fix interface name in log