/*
This file is a part of libcds - Concurrent Data Structures library
- (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
test( pq );
}
+ TEST_F( FCPQueue, vector_empty_wait_strategy )
+ {
+ struct pqueue_traits : public cds::container::fcpqueue::traits
+ {
+ typedef cds::container::fcpqueue::stat<> stat;
+ typedef cds::algo::flat_combining::wait_strategy::empty wait_strategy;
+ };
+
+ typedef cds::container::FCPriorityQueue<
+ value_type
+ , std::priority_queue<
+ value_type
+ , std::vector<value_type>
+ , less
+ >
+ , pqueue_traits
+ > pqueue_type;
+
+ pqueue_type pq;
+ test( pq );
+ }
+
+ TEST_F( FCPQueue, vector_multi_mutex_multi_condvar )
+ {
+ struct pqueue_traits : public cds::container::fcpqueue::traits
+ {
+ typedef cds::container::fcpqueue::stat<> stat;
+ typedef cds::algo::flat_combining::wait_strategy::multi_mutex_multi_condvar<> wait_strategy;
+ };
+
+ typedef cds::container::FCPriorityQueue<
+ value_type
+ , std::priority_queue<
+ value_type
+ , std::vector<value_type>
+ , less
+ >
+ , pqueue_traits
+ > pqueue_type;
+
+ pqueue_type pq;
+ test( pq );
+ }
+
TEST_F( FCPQueue, vector_stat )
{
struct pqueue_traits : public cds::container::fcpqueue::traits
test( pq );
}
+ TEST_F( FCPQueue, vector_stat_single_mutex_multi_condvar )
+ {
+ struct pqueue_traits : public cds::container::fcpqueue::traits
+ {
+ typedef cds::container::fcpqueue::stat<> stat;
+ typedef cds::algo::flat_combining::wait_strategy::single_mutex_multi_condvar<42> wait_strategy;
+ };
+
+ typedef cds::container::FCPriorityQueue<
+ value_type
+ , std::priority_queue<
+ value_type
+ , std::vector<value_type>
+ , less
+ >
+ , pqueue_traits
+ > pqueue_type;
+
+ pqueue_type pq;
+ test( pq );
+ }
+
TEST_F( FCPQueue, vector_mutex )
{
typedef cds::container::FCPriorityQueue<
test( pq );
}
+ TEST_F( FCPQueue, vector_single_mutex_single_condvar )
+ {
+ typedef cds::container::FCPriorityQueue<
+ value_type
+ ,std::priority_queue< value_type >
+ ,cds::container::fcpqueue::make_traits<
+ cds::opt::lock_type< std::mutex >
+ , cds::opt::wait_strategy< cds::algo::flat_combining::wait_strategy::single_mutex_single_condvar<1000>>
+ >::type
+ > pqueue_type;
+
+ pqueue_type pq;
+ test( pq );
+ }
+
} // namespace cds_test