1 #include <cds/gc/dhp.h>
4 #include <cds/container/fcdeque.h>
5 #include <cds/intrusive/fcqueue.h>
11 namespace ci = cds::intrusive;
12 namespace cc = cds::container;
13 typedef cds::gc::HP hp_gc;
20 // At least, declare the queue type
21 typedef cc::FCDeque<Foo> MyDeque;
27 // Initialize Hazard Pointer singleton
28 cds::gc::HP hpGC(128, 8, 128);
29 // If main thread uses lock-free containers
30 // the main thread should be attached to libcds infrastructure
31 cds::threading::Manager::attachThread();
37 bool succ = q.pop_front(res);
39 cout << "Dequeued " << res.x << "\n";
41 cout << "Dequeued none\n";