Use Queue instead of list to communicate.