runs a thread and simulates it doing a job