added queue lock among multi-thread