Run three methods in a fixed order across threads
Three methods, first(), second() and third(), are called by three different threads in any order. Make sure they always run in that order, using locks, events or semaphores.
No answer yet. Write the first one; the best answer gets endorsed.
