The system now responds to shutdown properly. Need to look at getting around the fact that GCC on mac does not have timed_mutex in the std yet