Added thread_exit(). Added printRing() which prints the ring of threads.