implement threading receiver
fix bug of infinit loop