//@cond
void preallocate_pool()
{
- m_pFirst = std_allocator().allocate( m_Queue.capacity() );
+ m_pFirst = std_allocator().allocate( m_Queue.capacity());
m_pLast = m_pFirst + m_Queue.capacity();
for ( value_type * p = m_pFirst; p < m_pLast; ++p ) {
value_type * p = m_Queue.pop();
if ( p ) {
- assert( from_pool(p) );
+ assert( from_pool(p));
return new( p ) value_type;
}
// The pool is empty - allocate new from the heap
CDS_UNUSED(n);
if ( p ) {
- if ( from_pool(p) ) {
+ if ( from_pool(p)) {
p->~value_type();
// The queue can notify about false fullness state
// so we push in loop
~lazy_vyukov_queue_pool()
{
std_allocator a;
- while ( !m_Queue.empty() )
+ while ( !m_Queue.empty())
a.deallocate( m_Queue.pop(), 1 );
}
if ( !p ) {
back_off bkoff;
- while ( m_Queue.size() ) {
+ while ( m_Queue.size()) {
p = m_Queue.pop();
if ( p )
goto ok;
}
ok:
- assert( from_pool(p) );
+ assert( from_pool(p));
return p;
}
back_off bkoff;
// The queue can notify it is full but that is false fullness state
// So, we push in loop
- while ( !m_Queue.push(*p) )
+ while ( !m_Queue.push(*p))
bkoff();
}
}