C++ lockless queue implementation forked from Obelisk