private void Append( Page page ) {
lock ( syncRoot ) {
if ( activeCount == 0 ) {
idle.Reset();
}
++activeCount;
for ( int slot = 0; slot < active.Length; ++slot ) {
if ( active[slot] == null ) {
active[slot] = new Chunk( this, slot, page.buffer, 0, page.length );
callback( active[slot] );
return;
}
}
pending.Enqueue( page );
}
}