Add a flush() method to all threads.