1 #include <cds/gc/dhp.h>
4 #include <cds/intrusive/fcqueue.h>
11 namespace ci = cds::intrusive;
12 typedef cds::gc::HP hp_gc;
14 struct Foo : boost::intrusive::list_base_hook<> {
19 // At least, declare the queue type
20 typedef ci::FCQueue<Foo> MyQueue;
26 // Initialize Hazard Pointer singleton
27 cds::gc::HP hpGC(128, 8, 128);
28 // If main thread uses lock-free containers
29 // the main thread should be attached to libcds infrastructure
30 cds::threading::Manager::attachThread();
38 cout << "Dequeued " << res->x << "\n";
40 cout << "Dequeued none\n\n";