Should probably use pthread_cancel, not pthread_kill.
Fix possible cause of threadpool not cleanly shutting down in benchmark.