implementation of lock free queue