Switched WorkQueue to use the std::function template