Some tests for thread.h