Check for -1 in thread