Commit 37374bb44b22dcb0fca327f7b6332bf94bfc3429

Con Kolivas 2012-02-11T13:11:56

Make shutdown more robust. Enable the input thread only after the other threads exist. Don't kill off the workio thread and use it to exit main() only if there is an unexpected problem. Use kill_work() for all anticipated shutdowns where possible. Remove unused thread entry.