Added some comments to thread.c