clean
Use Queue instead of list with condition and locks