Commits
Arthur Taylor committed 34b14d7a710
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 condition variable, these events can spin the loop, allowing the loop to wait for possibly longer times. This is the subject of a future change. Secondly, this change makes locking easier, allowing the worker thread to possess the mutex, relinquishing it only when waiting or executing. Thirdly, this change drops the requirement for switch_queue_pop_timeout(), a function which depends on out-of-tree features of apr-utils.