Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
bool pop( value_type& dest )
{
scoped_lock l( m_Lock );
- if ( !m_PQueue.empty() ) {
+ if ( !m_PQueue.empty()) {
dest = m_PQueue.top();
m_PQueue.pop();
return true;
bool pop_with( Q& dest, MoveFunc f )
{
scoped_lock l( m_Lock );
- if ( !m_PQueue.empty() ) {
- f( dest, m_PQueue.top() );
+ if ( !m_PQueue.empty()) {
+ f( dest, m_PQueue.top());
m_PQueue.pop();
return true;
}
void clear()
{
scoped_lock l( m_Lock );
- while ( !m_PQueue.empty() )
+ while ( !m_PQueue.empty())
m_PQueue.pop();
}
void clear_with( Func f )
{
scoped_lock l( m_Lock );
- while ( !m_PQueue.empty() ) {
- f( m_PQueue.top() );
+ while ( !m_PQueue.empty()) {
+ f( m_PQueue.top());
m_PQueue.pop();
}
}
template <typename T, typename Tree>
bool operator()( T& dest, Tree& container ) const
{
- typename Tree::guarded_ptr gp( container.extract_max() );
+ typename Tree::guarded_ptr gp( container.extract_max());
if ( gp )
dest = *gp;
return !gp.empty();
template <typename T, typename Tree>
bool operator()( T& dest, Tree& container ) const
{
- typename Tree::exempt_ptr ep( container.extract_max() );
+ typename Tree::exempt_ptr ep( container.extract_max());
if ( ep )
dest = *ep;
return !ep.empty();
template <typename T, typename Tree>
bool operator()( T& dest, Tree& container ) const
{
- typename Tree::guarded_ptr gp( container.extract_min() );
+ typename Tree::guarded_ptr gp( container.extract_min());
if ( gp )
dest = *gp;
return !gp.empty();
template <typename T, typename Tree>
bool operator()( T& dest, Tree& container ) const
{
- typename Tree::exempt_ptr ep( container.extract_min() );
+ typename Tree::exempt_ptr ep( container.extract_min());
if ( ep )
dest = *ep;
return !ep.empty();
template <typename T, typename Set>
bool operator()( T& dest, Set& container ) const
{
- typename Set::guarded_ptr gp( container.extract_max() );
+ typename Set::guarded_ptr gp( container.extract_max());
if ( gp )
dest = *gp;
return !gp.empty();
template <typename T, typename Set>
bool operator()( T& dest, Set& container ) const
{
- typename Set::exempt_ptr ep( container.extract_max() );
+ typename Set::exempt_ptr ep( container.extract_max());
if ( ep )
dest = *ep;
return !ep.empty();
template <typename T, typename Set>
bool operator()( T& dest, Set& container ) const
{
- typename Set::guarded_ptr gp( container.extract_min() );
+ typename Set::guarded_ptr gp( container.extract_min());
if ( gp )
dest = *gp;
return !gp.empty();
template <typename T, typename Set>
bool operator()( T& dest, Set& container ) const
{
- typename Set::exempt_ptr ep( container.extract_min() );
+ typename Set::exempt_ptr ep( container.extract_min());
if ( ep )
dest = *ep;
return !ep.empty();
static inline property_stream& operator <<( property_stream& o, cds::container::fcpqueue::stat<> const& s )
{
- return o
+ return o
<< CDSSTRESS_STAT_OUT( s, m_nPush )
<< CDSSTRESS_STAT_OUT( s, m_nPushMove )
<< CDSSTRESS_STAT_OUT( s, m_nPop )