thread.c improvement