test program for the threads library