RBC interview question

Implement a thread class and include loop