receive.c add thread