Add the thread library and a new class thread