Fun with multithreaded programming.