Adobe Interview Question

write code for a thread scheduler