with mutex deque