fix Thread; fix warnings;
fix warnings(GCC)