Use a typedef for thread worker functions so that we may cast to it to suppress warnings.