Proptiger interview question

Q. How will you print 1-40 using 4 threads.