http://25thandclement.com/~william/projects/cqueues.html