fix starvation problem in child thread