use thread rewrite the manage.c
update manage_thread