Added thread safe queue and included in Thread