CAS-based lock-free algorithm for shared deques
Simple, fast, and practical non-blocking and blocking concurrent queue algorithms